
/*function extLink(url){
	var w = screen.width * 0.6;
	var h = screen.height * 0.6;
	window.open(url, "mywindow","location=1,status=1,resizable=1,menubar=1,scrollbars=1,width="+w+",height="+h);
}*/
function extLinkCustomizer(sLink, deepLinkURL){
	//var w = screen.width * 0.6;
	//var h = screen.height * 0.6;
	var leftX = 200;
	var topY = 200;
	if (screen && screen.availWidth && screen.availHeight) {
		leftX = (screen.availWidth - 570) / 2;
		topY = (screen.availHeight - 360) / 2;
	}
	if (window.opera) topY = 2 * topY / 3;
	
	var sParse = deepLinkURL.indexOf("=");
	var sSplit = deepLinkURL.slice(sParse + 1);
		
	//var url = location.href + "/email_customizer"; - this was causing problems when deeplinking from send to friend emails
	var url = "http://www.ford.com/the2010mustang/email_customizer";
	
	switch (sLink) {
		case "customizer":
			window.open(url+'/?deeplink='+ sSplit, '', 'width=570,height=360,top='+topY+',left='+leftX);
		break;
	}
}
function extLink(sLink) {
		var leftX = 200;
		var topY = 200;
		if (screen && screen.availWidth && screen.availHeight) {
			leftX = (screen.availWidth - 570) / 2;
			topY = (screen.availHeight - 360) / 2;
		}
		if (window.opera) topY = 2 * topY / 3;
		switch (sLink) {
			case "update":
			  open('http://www.ford.com/trucks/superduty/?guflip=enabled&gumode=mail+email&srccode=312847-001');
			break;
			case "friend":
			   open('/the2010mustang/tellafriend/', '', 'width=570,height=420,top='+topY+',left='+leftX);
			break;
			case "guide":
			   open('/assets/modules/the2010mustang-launch/pdf/OrderGuide.pdf', '', '');
			break;
			case "fvcom":
			   open('http://www.ford.com/cars/mustang/', '', 'width=800,height=600,top='+topY+',left='+leftX+',resizable=1,location=1,scrollbars=1,toolbar=1');
			break;
			case "ford":
				open('http://www.ford.com/', '', 'width=800,height=600,top='+topY+',left='+leftX+',resizable=1,location=1,scrollbars=1,toolbar=1');
			break;
			case "bp":
				open('http://bp2.forddirect.ford.com/2010-Ford-Mustang#page=/ChooseYourPath/', '', 'width=800,height=600,top='+topY+',left='+leftX+',resizable=1,location=1,scrollbars=1,toolbar=1');
			break;
			case "quote":
				open('http://www.quickquote.ford.com/2010-Ford-Mustang#page=/InteractiveQuickQuote/', '', 'width=800,height=600,top='+topY+',left='+leftX+',resizable=1,location=1,scrollbars=1,toolbar=1');
			break;
			case "brochure":
				open('https://secure.ford.com/brochures/index.asp', '', 'width=800,height=600,top='+topY+',left='+leftX+',resizable=1,location=1,scrollbars=1,toolbar=1');
			break;
			case "map":
				open('http://maps.google.com/maps/ms?ie=UTF8&hl=en&msa=0&msid=102580298148444100910.000466e90a6f816904366&ll=36.139185,137.015342&spn=11.206524,19.02832&t=h&z=6', '', 'width=800,height=600,top='+topY+',left='+leftX+',resizable=1');
			break;
			case "map2":
				open('http://maps.google.com/maps/ms?ie=UTF8&hl=en&t=k&msa=0&ll=33.700922,-112.520728&spn=0.030134,0.07184&z=15&msid=102580298148444100910.00046ca14b69ef12d5006', '', 'width=800,height=600,top='+topY+',left='+leftX+',resizable=1');
			break;
			case "map3":
				open('http://maps.google.com/maps/ms?ie=UTF8&hl=en&msa=0&msid=102580298148444100910.00046e220349dec35fc5a&ll=33.635473,-79.064856&spn=10.419827,18.61084&t=h&z=6', '', 'width=800,height=600,top='+topY+',left='+leftX+',resizable=1');
			break;
			case "map4":
				open('http://maps.google.com/maps/ms?ie=UTF8&hl=en&msa=0&msid=102580298148444100910.00046e388428e90abf930&ll=40.5472,-74.351349&spn=0.594808,1.163177&z=10', '', 'width=800,height=600,top='+topY+',left='+leftX+',resizable=1');
			break;
			case "map5":
				open('http://maps.google.com/maps/ms?ie=UTF8&hl=en&msa=0&msid=102580298148444100910.000471a7e3b71e21ff82a&t=h&z=14', '', 'width=800,height=600,top='+topY+',left='+leftX+',resizable=1');
			break;
			case "youtube":
				open('http://www.youtube.com/fordmustang', '', 'width=800,height=600,top='+topY+',left='+leftX+',resizable=1,location=1,scrollbars=1,toolbar=1');
			break;
			case "twitter":
				open('http://www.twitter.com/fordmustang', '', 'width=800,height=600,top='+topY+',left='+leftX+',resizable=1,location=1,scrollbars=1,toolbar=1');
			break;
			case "flickr":
				open('http://www.flickr.com/groups/mustangs/', '', 'width=800,height=600,top='+topY+',left='+leftX+',resizable=1,location=1,scrollbars=1,toolbar=1');
			break;
			case "signupdate":
			   open('https://secure.ford.com/2011superduty/updates/', '', 'width=577,height=600,top='+topY+',left='+leftX);
			break;
		}
}

