/* 
Popup code for 500Abarth pages
@updated 07/04/09:  Steve Smith     |   Wrote reusable popup methods (openPopup, openUrlInParent and closePopup) 
										in main.js
                                        All HTML references to the methods in this file
                                        have been amended to use the new reusable methods
                                        THIS FILE CAN BE REMOVED ONCE FLASH REFERENCES HAVE BEEN AMENDED
                                        SEE https://extranet.akqa.com/manage/browse/FIATBAU-92
*/

function closeOldAbarthWindow() {
	window.name = "abarthParent";
	var abarth_popup = window.open("",'abarth_popup');
	abarth_popup.close();
}


function openAbarthWindow(id) {
	if (id == "terms")
	{
		abarth_popup = window.open("/500abarth/Terms.aspx?bg=tc",'abarth_popup','location=0,status=0,scrollbars=1,height=685,width=575,resizable=0');
	}
	else if (id == "privacy")
	{
		abarth_popup = window.open("/500abarth/Privacy.aspx?bg=pp",'abarth_popup','location=0,status=0,scrollbars=1,height=685,width=575,resizable=0');
	}
	else if (id == "contactus")
	{
		abarth_popup = window.open("/500abarth/Contact.aspx?bg=cu",'abarth_popup','location=0,status=0,scrollbars=1,height=295,width=575,resizable=0');
	}
	else if (id == "cvv")
	{
		abarth_popup = window.open("/500abarth/SecurityCode.aspx?bg=sc",'abarth_popup','location=0,status=0,scrollbars=1,height=295,width=575,resizable=0');
	}
			
	return false;
}


function openAbarthParent( url ) {

	window.open( url, "abarthParent" );
	window.close();
	
}