var lastMake;
var lastModel;

function setDaysCookie(name,value,expire) { 
    if (name == 'lastMake') lastMake=name; 
    if (name == 'lastModel') lastModel = name;
    setCookie(name,value,expire*24*3600*1000); 
}
function setMinutesCookie(name,value,expire){ setCookie(name,value,expire*60*1000); }
function setCookie(name,value,expire) {
  var ExpireDate = new Date ();
  ExpireDate.setTime(ExpireDate.getTime() + (expire ));
  document.cookie = name + "=" + escape(value) + ((expire == null) ? "" : "; expires=" +   ExpireDate.toGMTString());
}

function getCookie(name){
  if (document.cookie.length > 0) {              
    begin = document.cookie.indexOf(name+"=");       
    if (begin != -1) {           
      begin += name.length+1;       
      end = document.cookie.indexOf(";", begin);
      if (end == -1) end = document.cookie.length;
      return unescape(document.cookie.substring(begin, end));
    }
  }
  return false;
}

function delCookie (name) { document.cookie = name + "=" + "; expires=Thu, 01-Jan-70 00:00:01 GMT"; }
function showLang(lang, rel) { setDaysCookie('redlinegoods', lang, 300); rel= true; }
function getUAMCookieInd(name, ind){
	var uama= getCookie(name);
	if (uama!=false){
		var ar= uama.split("|");
		if (ind<0||ind>4)
			return false;
		else
            return ar[ind];
	}
	return false;
}
function zaladuj() { if (document.e.url.value != "X") parent.location.href=document.e.url.value; }
function loadmake() { 
if (document.e.make_top.value == "none") {
alert ("Please choose make first!");
return;
}
var selmake = document.e.make_top.value.toUpperCase();
//alert (selmake);
if (selmake=='ACURA')	jumpto='productsAcura.php';
if (selmake=='ALFA ROMEO')	jumpto='productsAlfaRomeo.php';
if (selmake=='AUDI')	jumpto='productsAudi.php';
if (selmake=='BMW')	jumpto='productsBmw.php';
if (selmake=='BUICK')	jumpto='productsBuick.php';
if (selmake=='CADILLAC')	jumpto='productsCadillac.php';
if (selmake=='CHEVROLET')	jumpto='productsChevrolet.php';
if (selmake=='CHRYSLER')	jumpto='productsChrysler.php';
if (selmake=='CORVETTE')	jumpto='productsCorvette.php';
if (selmake=='DATSUN')	jumpto='productsDatsun.php';
if (selmake=='DELOREAN')	jumpto='Deloreanshiftboot.php';
if (selmake=='DODGE')	jumpto='productsDodge.php';
if (selmake=='FIAT')	jumpto='productsFiat.php';
if (selmake=='FORD')	jumpto='productsFord.php';
if (selmake=='GEO')	jumpto='productsGeo.php';
if (selmake=='GMC')	jumpto='productsGMC.php';
if (selmake=='HONDA')	jumpto='productsHonda.php';
if (selmake=='HURST')	jumpto='productsHurst.php';
if (selmake=='HYUNDAI')	jumpto='productsHyundai.php';
if (selmake=='INFINITI')	jumpto='productsInfiniti.php';
if (selmake=='ISUZU')	jumpto='Rodeo9195shiftboot.php';
if (selmake=='JAGUAR')	jumpto='productsJaguar.php';
if (selmake=='JEEP')	jumpto='productsJeep.php';
if (selmake=='KIA')	jumpto='productsKia.php';
if (selmake=='LAND ROVER')	jumpto='productsLandRover.php';
if (selmake=='LEXUS')	jumpto='productsLexus.php';
if (selmake=='LOTUS')	jumpto='productsLotus.php';
if (selmake=='MAZDA')	jumpto='productsMazda.php';
if (selmake=='MG')	jumpto='productsMG.php';
if (selmake=='MINI')	jumpto='productsMini.php';
if (selmake=='MERCEDES')	jumpto='productsMercedes.php';
if (selmake=='MERCURY')	jumpto='productsMercury.php';
if (selmake=='MITSUBISHI')	jumpto='productsMitsubishi.php';
if (selmake=='NISSAN')	jumpto='productsNissan.php';
if (selmake=='OLDSMOBILE')	jumpto='productsOldsmobile.php';
if (selmake=='PLYMOUTH')	jumpto='productsPlymouth.php';
if (selmake=='PONTIAC')	jumpto='productsPontiac.php';
if (selmake=='PORSCHE')	jumpto='productsPorsche.php';
if (selmake=='SAAB')	jumpto='productsSaab.php';
if (selmake=='SATURN')	jumpto='productsSaturn.php';
if (selmake=='SCION')	jumpto='productsScion.php';
if (selmake=='SUBARU')	jumpto='productsSubaru.php';
if (selmake=='SUZUKI')	jumpto='productsSuzuki.php';
if (selmake=='TOYOTA')	jumpto='productsToyota.php';
if (selmake=='VOLKSWAGEN')	jumpto='productsVw.php';
if (selmake=='VOLVO')	jumpto='productsVolvo.php';
//alert (jumpto);
parent.location.href=jumpto; 
}
function zaladuj2() { if (document.e.url2.value != "X") parent.location.href=document.e.url2.value; }

var lang = getCookie("redlinegoods");
if (!lang){ setDaysCookie("redlinegoods", "ENG", 300); lang= "ENG"; }

function news_subscribe() {
	popup = window.open("news_subscribe.php","popupp","height=320,width=640,scrollbars=no,resize=no");
}

function news_unsubscribe() {
	popup = window.open("news_unsubscribe.php","popupp","height=320,width=640,scrollbars=no,resize=no");
}

function siteLock() { 
    popup = window.open("https://www.sitelock.com/verify.php?site=www.redlinegoods.com","popupp","height=640,width=820,scrollbars=no,resize=no"); 
}

function moneybackENG()
{ popup = window.open("moneybackENG.php","popupp","height=600,width=800,scrollbars=yes,resize=no");
}

function moneybackESP()
{ popup = window.open("moneybackESP.php","popupp","height=600,width=800,scrollbars=yes,resize=no");
}

function moneybackDEU()
{ popup = window.open("moneybackDEU.php","popupp","height=600,width=800,scrollbars=yes,resize=no");
}

function special() {
popup = window.open("special.php","popupp","height=200,width=600,scrollbars=no,resize=no");
}
