
var browser = navigator.appName,
	isMSIE = "Microsoft Internet Explorer",
	isNS = "Netscape",
	isAMac = navigator.platform;

function openP221Updates() {
	html = "../updates/index.asp?bhcp=1";
	wval = "500";
	hval = "530";
	var nWindow=window.navigate( html, 'newWin', 'width='+wval+',height='+hval+',toolbar=no,status=no,menubar=no,scrollbars=yes,resizable=no');
}


function TurnOnImage(oElement){	
	img = eval(oElement + "On.src");
	document [oElement].src = img;
}
	
function TurnOffImage(oElement){
	img = eval(oElement + "Off.src");
	document [oElement].src = img;
}	
function openFreestar() {
	html = "/freestar/";
	wval = "605";
	hval = "565";
	var nWindow=window.open( html, 'newWin', 'width='+wval+',height='+hval+',toolbar=no,status=no,menubar=no,scrollbars=NO,resizable=NO');
}


function openWindow(mypage, myname, w, h, wint, winl, scroll, resizable, menubar, status, titlebar, toolbar, location) 
	{
		var win;
		
		winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable='+resizable+',menubar='+menubar+',status='+status+',titlebar='+titlebar+',toolbar='+toolbar+',location='+location;
		win = window.open(mypage, myname, winprops);
	}

function changeParentWin(strPage){
	//Refreshes parent window, unless parent window is closed. In that case, it refreshes current window.
	if(typeof(top.opener.document) == "object") {
		top.opener.location.href=strPage;     
		top.opener.focus();
	}
	else{
		document.location=strPage;
	}          
}
function popupPageWithNav(loc, name, width, height) {
	window_options = "'toolbar=yes,location=yes,buttons=yes;directories=yes,status=yes,menubar=yes,toolbar=yes,resizable=yes,scrollbars,copyhistory=yes,height=" + height + ",width=" + width + ",screenX=100,screenY=100'";
	nwn = window.open(loc,name,window_options);
	nwn.focus();
} 

function FIPWin(nPopupID){
	window.open("/asp/fippopup.asp?nPopupID=" + nPopupID,"fip","toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=no,scrollbars=no,copyhistory=no,width=350,height=430,top=0,left=50,screenX=50,screenY=0");
}

function openAudioAnthem() {
	html = "/asp/vehicles/audiopopup_home.asp";
	wval = "250";
	hval = "207";
	var nWindow=window.open( html, 'newWin', 'top=160,left=300,width='+wval+',height='+hval+',toolbar=no,status=no,menubar=no,scrollbars=no,resizable=no');
}
function goexternal(sURL){
	if( confirm( "You are linking to a non-Ford website. When you click ‘OK’, you are subject to the terms and conditions of that site. Please read over the site’s terms and conditions and privacy policy.") ) {
		// Leave Site - linking code goes here
		document.location = sURL;
	} else {
		// Don't Leave Site
	}
}
	



function isSpecialLink(strLink)
{
  strLink = strLink.toLowerCase();
  
   if(strLink=="javascript://")
   return true;
   
   else if(strLink.indexOf("/features/harley/vehicle_imgs.asp")!=-1 && strLink.indexOf("#")!=-1)
   return true;
   
   else if(strLink.indexOf("/features/harley/img_gallerys.asp")!=-1 && strLink.indexOf("#")!=-1)
   return true;
   
   else
   return false;
}




function popOutside(sURL) {
	if( confirm( "You are linking to a non-Ford website.  Your browsing and interaction are subject to the rules and policies of that site.  Please read over the site's rules and policies before proceeding." ) ) 
	{
		n = window.open(sURL, 'n', 'width=700,height=555,location=yes,toolbar=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes');
		n.focus();

	} else {
		// Don't Leave Site
	}
}


function popFullFunc( window_http, window_name, nW, nH ) {
	var	window_left = 140; 
	var window_top = 150;
		
	window_options = "'toolbar=yes,location=yes,status=yes,menubar=yes,resizable=yes,scrollbars=yes,height=" + nH + ",width=" + nW + ",left=" + window_left + ",screenX=" + window_left + ",top=" + window_top + ",screenY=" + window_top + "'";
	window.open( window_http, window_name, window_options );
}

function openNewWindow(theURL,winName,features) {
	var newWin;
	var locationString = '';
	if (newWin && ieX){
		locationString = locationString + newWin.location;
		if (locationString != ''){
			newWin.location.href = theURL;
		} else {
			newWin = window.open(theURL,winName,features);
			}
	} else {
		newWin = window.open(theURL,winName,features);
		}
}



//-- POPUP SURVEY STOP


/**************************************************
	T O W I N G   M O D U L E  - START
***************************************************/

function FV_openBrWindow(theURL,winName,features) { 
  window.name = "towingWindow";
  window.open(theURL,winName,features);
}

function FV_openTowingModle( type, vehicle, cab ) {
	window.name = "towingWindow";
	self.name = "towingWindow";
	if( cab == "" ) {
		FV_openBrWindow('/towing/popup.asp?type='+ type +'&uid=' + vehicle + '' ,'TowingGuide','width=725,height=581,resizable=1');
	} else {
		FV_openBrWindow('/towing/popup.asp?type='+ type +'&uid=' + vehicle + '&cid=' + cab + '' ,'TowingGuide','width=725,height=581,resizable=1');
	}
}
function SetTrackingCookie(){
	var _cimage = new Image();
	_cimage.src = "/asp/util/cookie.asp" + location.search.toLowerCase();
}
SetTrackingCookie();



/**************************************************
	T O W I N G   M O D U L E  - END
***************************************************/
