var hide  = true;
function setLyr(obj,lyr)
{
	var newX = findPosX(obj);
	var newY = findPosY(obj);
	var x = new getObj(lyr);
	x.style.top = newY + 'px';
	x.style.left = newX + 'px';
}
function findPosX(obj)
{
	var curleft = -1;
	if (obj.offsetParent)
	{
		while (obj.offsetParent)
		{
			curleft += obj.offsetLeft
			obj = obj.offsetParent;
		}
	}
	else if (obj.x)
		curleft += obj.x;
	return curleft;
}

function findPosY(obj)
{
	var curtop = 24;
	var printstring = '';
	if (obj.offsetParent)
	{
		while (obj.offsetParent)
		{
			curtop += obj.offsetTop
			obj = obj.offsetParent;
		}
	}
	else if (obj.y)
		curtop += obj.y;
	return curtop;
}
function getObj(name)
{
 if (document.getElementById)
 {
	   this.obj = document.getElementById(name);
	   this.style = document.getElementById(name).style;
 }
 else if (document.all)
 {
	   this.obj = document.all[name];
	   this.style = document.all[name].style;
 }
 else if (document.layers)
 {
	   if (document.layers[name])
	   {
	   	this.obj = document.layers[name];
	   	this.style = document.layers[name];
	   }
	   else
	   {
	    this.obj = document.layers.testP.layers[name];
	    this.style = document.layers.testP.layers[name];
	   }
 }
}
function adjust() {
	setLyr(SERVICE_1_link,'SERVICE_1');
	setLyr(SERVICE_2_link,'SERVICE_2');
	setLyr(SERVICE_3_link,'SERVICE_3');
	setLyr(SERVICE_4_link,'SERVICE_4');
	setLyr(modelmenucell,'modelmenu');
}
/*
function adjust2() {
	setLyr(SERVICE_1_link,'SERVICE_1');
	document.getElementById("SERVICE_1").style.display = "block";
	setLyr(SERVICE_2_link,'SERVICE_2');
	document.getElementById("SERVICE_2").style.display = "block";
	setLyr(SERVICE_3_link,'SERVICE_3');
	document.getElementById("SERVICE_3").style.display = "block";
	setLyr(SERVICE_4_link,'SERVICE_4');
	document.getElementById("SERVICE_4").style.display = "block";
	setLyr(modelmenucell,'modelmenu');
	document.getElementById("modelmenu").style.display = "block";
}*/
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
window.onresize = adjust;
//window.onload = adjust2;

// Rollover images for Calls to actions and my Peugeot section

function SwapImagemy_config_summary() {
	document.my_config_summary.src="/templates/peugeot06/images/my_config_summary_o.gif" 
}
function SwapImagemy_config_summaryBack() {
	document.my_config_summary.src="/templates/peugeot06/images/my_config_summary.gif" 
}
function SwapImagemy_Request_a_Test_Drive() {
	document.my_Request_a_Test_Drive.src="/templates/peugeot06/images/my_Request_a_Test_Drive_o.gif" 
}
function SwapImagemy_Request_a_Test_DriveBack() {
	document.my_Request_a_Test_Drive.src="/templates/peugeot06/images/my_Request_a_Test_Drive.gif" 
}
function SwapImagemy_Finance() {
	document.my_Finance.src="/templates/peugeot06/images/my_Finance_o.gif" 
}
function SwapImagemy_FinanceBack() {
	document.my_Finance.src="/templates/peugeot06/images/my_Finance.gif" 
}
function SwapImagemy_Contact_a_Dealer() {
	document.my_Contact_a_Dealer.src="/templates/peugeot06/images/my_Contact_a_Dealer_o.gif" 
}
function SwapImagemy_Contact_a_DealerBack() {
	document.my_Contact_a_Dealer.src="/templates/peugeot06/images/my_Contact_a_Dealer.gif" 
}
function SwapImage4() {
	document.save.src="/templates/peugeot06/images/my_save_config_o.gif" 
}
function SwapImage4Back() {
	document.save.src="/templates/peugeot06/images/my_save_config.gif" 
}
function SwapImageedit_my_profile() {
	document.my_edit_my_profile.src="/templates/peugeot06/images/my_edit_my_profile_o.gif" 
}
function SwapImageedit_my_profileBack() {
	document.my_edit_my_profile.src="/templates/peugeot06/images/my_edit_my_profile.gif" 
}
function SwapImagebuild_another() {
	document.my_build_another.src="/templates/peugeot06/images/my_build_another_o.gif" 
}
function SwapImagebuild_anotherBack() {
	document.my_build_another.src="/templates/peugeot06/images/my_build_another.gif" 
}
function SwapImagelogout() {
	document.my_logout.src="/templates/peugeot06/images/my_logout_o.gif" 
}
function SwapImagelogoutBack() {
	document.my_logout.src="/templates/peugeot06/images/my_logout.gif" 
}
function SwapImagemy_Save_your_Configuration() {
	document.my_Save_your_Configuration.src="/templates/peugeot06/images/my_Save_your_Configuration_o.gif" 
}
function SwapImagemy_Save_your_ConfigurationBack() {
	document.my_Save_your_Configuration.src="/templates/peugeot06/images/my_Save_your_Configuration.gif" 
}

