<!--
if (document.layers)  {ns = 1; ie = 0; ns6=0;} 
if (document.all) {ns = 0; ie = 1; ns6=0;}
if (document.getElementById&&!document.all) {ns6=1; ns=0; ie=0;}
var ctmax; var gtmax;

function printpop(url,id) {
window.open(url,id,"height=550,width=700,top=10,left=20,toolbar=yes,location=no,status=yes,menubar=yes,scrollbars=yes,resizable=yes");}

function pdfpop(url) {id=getStamp();
window.open(url,id,"height=500,width=700,top=10,left=50,scrollbars=yes,resizable=yes,status=yes");}

function tickpop() {id=getStamp(); var url="/support/";
window.open(url,id,"height=600,width=900,top=5,left=70,scrollbars=yes,toolbar=yes,menubar=yes,resizable=yes,status=yes");}


function popic(pic) {
txt ='<html><head><SCRIPT LANGUAGE="JavaScript" src=mm1.js></SCRIPT></head>';
txt +='<body bgcolor=ffffff><img src="images/prod/'+pic+'"><br>';
msg=open("","","height=350,width=350,top=200,left=300,scrollbars=yes,resizable=yes");
msg.document.write(txt); msg.document.close(); msg.focus();
}

function poptxt(dv) {
var cont=document.getElementById(dv).innerHTML;
txt ='<html><head><SCRIPT LANGUAGE="JavaScript" src=mm1.js></SCRIPT></head>';
txt +='<body bgcolor=ffffff>'+cont;
msg=open("","","height=350,width=350,top=150,left=500,scrollbars=yes,resizable=yes");
msg.document.write(txt); msg.document.close(); msg.focus();
}


function popdet(pic,gx,uid,type,model,vehic) {
url="pop.mv?detail+&pic="+pic+"+&gx="+gx+"+&uid="+uid;
url +="+&type="+type+"+&model="+model+"+&vehic="+vehic;
msg=open(url,"detail","height=580,width=990,top=40,left=10,scrollbars=yes,status=yes,resizable=yes");
msg.focus();
}

function popanc(pic,gx,uid,cat,scat) {
url="pop.mv?detanc+&pic="+pic+"+&gx="+gx+"+&uid="+uid;
cat=inOut(' ','_',cat); scat=inOut(' ','_',scat); 
url +="+&cat="+cat;
if(scat != "") {url +="+&scat="+scat;}
msg=open(url,"detail","height=580,width=950,top=50,left=25,scrollbars=yes,status=yes,resizable=yes");
msg.focus();
}

function regit(uid) {
var url="seite.mv?90-00-00-00+&uid="+uid;
if ((window.opener.parent.frames.length > 0)&&(window.opener.parent.frames[0].name=="newhot")) 
{window.opener.parent.document.location.href=url;} 
else {window.opener.location.href=url;}
window.opener.focus(); self.close();
}


function getStamp() {
var today=new Date();
var rand=today.getTime();
var picker="a"+rand;
var pick1=picker.charAt((picker.length - 2));
var pick2=picker.charAt((picker.length - 4));
var pick3=picker.charAt((picker.length - 6));
var pick = "jos"+pick1+pick2+pick3;
return pick;
}

function inOut(out,add,thestr) {
thestr = ""+thestr; 
while (thestr.indexOf(out)>-1) {pos= thestr.indexOf(out);
thestr = "" + (thestr.substring(0, pos) + add + thestr.substring((pos + out.length), thestr.length));}
return thestr;
}


function getPrice(omax) {
var omax=omax*1; var ph=""; document.perl.num.value="";
document.getElementById("result").innerHTML="<img src=\"images/frame/loading.gif\">";

	for (i = 1; i < omax; i++) {
	var xn=document.form["num"+i].value;
	var xt=document.form["txt"+i].value;
	if(xn !="") {ph +=xn+","+i+",";}
	else {document.form["priz"+i].value=""; document.form["equ"+i].value="";}
	if((xn =="")&&(xt =="")) {document.form["anz"+i].value="";}
	}

  if(ph !="") {document.perl.num.value=ph; document.perl.submit();} 
  else {document.getElementById("result").innerHTML="";}
}

function ordocheck() {
var omax=document.form.omax.value; omax=omax*1;
var n=0; var p=0;  var a=0; var t=0; var err="";

	for (i = 1; i < omax; i++) {
	var xn=document.form["num"+i].value;
	var xp=document.form["priz"+i].value;
	var xa=document.form["anz"+i].value;
	var xt=document.form["txt"+i].value;
	if(xn !="") {n++;} else { if(xt !="") {t++;}}
	if(xp !="") {p++;}  if(xa !="") {a++;} 
	}

var all=t+n;
if(t > 0) {} else {
if(n < 1) {err +="missing Article Numbers\n";}
if(p < 1) {err +="missing Prices\n";}
}
if((a < 1)||(a !=all)) {err +="missing Quantities\n";} 


var nclient=document.form.nclient.value;
var nxclient=document.form.nxclient.value;
nxxclient=inOut(' ','',nxclient);
if(nxxclient.length < 2) {document.form.nxclient.value=""; nxclient="";}
var client=nclient+nxclient; 
if(client =="") {err +="missing Customer Name\n";}


if(err !="") {alert(err); return false;}
else {return true;}

}


function hideRow(obid) {showRow(obid);}

function showRow(obid) {
var row="row_"+obid; var link="link_"+obid;
var nowurl=document.getElementById(link).innerHTML;
var newclass=""; var newlink=""; 
if(nowurl.indexOf('show') >-1) {newclass="showper";
	newlink=inOut('show','hide',nowurl);}
if(nowurl.indexOf('hide') >-1) {newclass="hideper";
	newlink=inOut('hide','show',nowurl);}

document.getElementById(row).className = newclass;
document.getElementById(link).innerHTML=newlink;
}

function popost(pn,uid) {
url="pop.mv?post+&pn="+pn+"+&uid="+uid;
feed=open(url,"feed","height=300,width=450,top=185,left=150,scrollbars=yes,resizable=yes");
feed.focus();
}

function framepic(pic) {var to="pictab";
var pix='<img src="images/prod/'+pic+'" hspace=3 vspace=3>';
document.getElementById(to).innerHTML=pix;
}

function refresh(uid,type,model,vehic,cat,scat) {
if(cat !="") {
	url="seite.mv?20-00-00-00+basket+&uid="+uid;
	url +="+&cat="+cat; if(scat != "") {url +="+&scat="+scat;}}
else {
	url="seite.mv?10-00-00-00+basket+&uid="+uid;
	url +="+&type="+type+"+&model="+model+"+&vehic="+vehic;}
window.opener.location.href=url;
}

function pon(n) {var name="pd"+n;
document.getElementById(name).className = "pmena";}
function poff(n) {var name="pd"+n;
document.getElementById(name).className = "pmenu";}

function setDIV(w) {
if(w ==1) {var content=document.getElementById("details"); 
	document.getElementById("feedback").style.visibility = "hidden"; pon(1); poff(2); 
	var box=document.getElementById("box1");}
	
if(w ==2) {var content=document.getElementById("feedback");
	document.getElementById("details").style.visibility = "hidden";  pon(4); poff(3); 
	var box=document.getElementById("box2");}

var infobox=document.getElementById("infobox");
content.style.visibility = "visible";
var contentheight=content.offsetHeight; contentheight=contentheight;

var maxheight=190;
	if(contentheight > maxheight) {
	contentheight=maxheight;
	content.style.height=contentheight+"px";
	box.style.height = "120px";
	box.style.overflow = "auto";
	}
infobox.style.height=contentheight+"px";
}


function shinfo(vs) {
if(vs ==1) {document.getElementById("vdv").style.visibility = "visible";}
if(vs ==2) {document.getElementById("vdv").style.visibility = "hidden";}
}


function on(m) {var name="m"+m;
document.getElementById(name).className = "menu1";}
function off(m) {var name="m"+m;
document.getElementById(name).className = "menu0";}

function makeChoice(sp) {
if(sp =="N") {document.form.special[0].checked=true; document.form.special[1].checked=false;}
if(sp =="O") {document.form.special[0].checked=false; document.form.special[1].checked=true;}
document.form.submit();
}

function passable() {
	if(document.shop.reg.checked==true) {
	document.shop.pass.className="formInputx";
	document.shop.pass.disabled=false;
	document.getElementById("pt").className = "";
	}
	if(document.shop.reg.checked==false) {
	document.shop.pass.className="formdis";
	document.shop.pass.disabled=true;
	document.getElementById("pt").className = "formTdis";
	}
}

function searcheck() {
var type=document.form.type.value;
var model=document.form.model.value;
err1 ="please select a car type\n";
err2 ="please select a car variant\n";
var error="";
if(type =="") {error +=err1;}
if(model =="") {error +=err2;}
if(error != "") {alert(error); return false;} 
else {return true;}
}

function carcheck() {
var car="§"+document.vhc.nvhnum.value+"§";
carcheck=inOut(' ','',car); 
if(carcheck =="§§") {alert('please insert a Licence Plate Number\n'); return false;}
else {return true;}
}

function servcheck(now) {
var error="";

err1="please insert Milage Current Service\n";
err5="please insert Next Service Date\n";
err6 ="please check Next Service Date\n";
err7 ="your E-Mail please\n";
err8 ="please check E-Mail\n";

var mile="§"+document.vhs.nvhmcs.value+"§";
milecheck=inOut(' ','',mile); 
if(milecheck =="§§") {error +=err1;}

if(document.vhs.nvhrem[0].checked==true) {
	var day=document.vhs.nextday.value;
	var mon=document.vhs.nextmon.value;
	var yy=document.vhs.nextyear.value;
	var xdate="" +yy+mon+day; xdate=xdate*1;
	if(xdate ==0) {error +=err5;} else {if(xdate < now) {error +=err6;}}

	var xemail=document.vhs.nvhmail.value;
	if(xemail =="") {error +=err7;}
	else {if((xemail.indexOf('@') == -1) || (xemail.indexOf('.') == -1)) {error +=err8;}}
}

if(error !="") {alert(error); return false;} else {return true;}
}


function formcheck() {
formvals();
err1 ="Your Name please\n";
err2 ="Your Address please\n";
err3 ="ZipCode is missing\n";
err4 ="City is missing\n";
err5 ="Country is missing\n";
err6 ="please choose a password\n";
err7 ="Your E-Mail please\n";
err8 ="please check E-Mail\n";
var error="";

if(xname =="") {error +=err1;}
if(xadr1 =="") {error +=err2;}
if(xzip =="") {error +=err3;}
if(xcity =="") {error +=err4;}
if(xland =="") {error +=err5;}

if(xemail =="") {error +=err7;}
else {if((xemail.indexOf('@') == -1) || (xemail.indexOf('.') == -1)) {error +=err8;}}

//basket registration
//if((document.shop.reg.checked==true)&&(document.shop.pass.value=="")) {error +=err6;}

//account registration
if((document.shop.reg.value=="")&&(document.shop.xreg.value=="yes")&&(document.shop.pass.value=="")) {error +=err6;}



var parastring = ""; var d="|";
parastring +=xname+d+xcompany+d+xadr1+d+xzip+d+xcity+d+xland+d+xtax+d+xemail;
parastring +=d;
parastring +=cname+d+ccompany+d+cadr1+d+czip+d+ccity+d+cland+d+ctax+d+cemail;
document.shop.data.value=parastring;

if(error != "") {alert(error); return false;} 
else {return true;}
}

function formvals() {
xname=document.shop.txtLastName.value;
xcompany=document.shop.txtCompany.value;
xadr1=document.shop.txtAddr1.value;
xzip=document.shop.txtZipCode.value;
xcity=document.shop.txtCity.value;
xtax=document.shop.txtTax.value;
xemail=document.shop.txtEmail.value;

cname=document.shop.recLastName.value;
ccompany=document.shop.recCompany.value;
cadr1=document.shop.recAddr1.value;
czip=document.shop.recZipCode.value;
ccity=document.shop.recCity.value;
ctax="";
cemail="";
//ctax=document.shop.recTax.value;
//cemail=document.shop.recEmail.value;

xxland=document.shop.txtCountry.value;
cxland=document.shop.recCountry.value;
xland=getCountry(xxland,'cty');
cland=getCountry(cxland,'cty');
}

function getCountry(str,ret) {
pos=str.indexOf("|"); var cty="";
if(pos>0) {cty=str.substring(0,pos); str=str.substring(pos+1,str.length);}

pos=str.indexOf("|"); var base=0; var ad=0;
if(pos>0) {base=str.substring(0,pos); ad=str.substring(pos+1,str.length);}

if(ret =="cty") {return cty;}
if(ret =="base") {return base;}
if(ret =="ad") {return ad;}
}


function xcopy() {
if(document.shop.sync.checked==true) {formvals();
document.shop.recLastName.value=xname;
document.shop.recCompany.value=xcompany;
document.shop.recAddr1.value=xadr1;
document.shop.recZipCode.value=xzip;
document.shop.recCity.value=xcity;
//document.shop.recTax.value=xtax;
//document.shop.recEmail.value=xemail;

var boxLength = document.shop.recCountry.length;
	if(xland == "") {document.shop.recCountry.options[0].selected=true;}
	else {for (c = 0; c < boxLength; c++) {
	thistxt = document.shop.recCountry.options[c].text;	
	if(xland == thistxt) {document.shop.recCountry.options[c].selected=true;}
	else {document.shop.recCountry.options[c].selected=false;}
	}}
}}


function calcship(gr,tot) {
var route; var gr=gr*1; var shipeuro=0; var vx=0; var v1=0; var v2=0; var v3=0; 

if(document.shop.ship[0].checked==true) {var route="regular";}
if(document.shop.ship[1].checked==true) {var route="local";}
if(document.shop.ship[2].checked==true) {var route="self";}
if(document.shop.ship[3].checked==true) {var route="vor";}
var zone=document.shop.recCountry.value.toLowerCase();

if((zone.indexOf('malta') != -1)||(zone =="mt")) {
	if(document.shop.ship[0].checked==true) {
	document.shop.ship[0].checked=false;
	document.shop.ship[1].checked=true; var route="local";
}}

else {
	if(document.shop.ship[1].checked==true) {
	document.shop.ship[1].checked=false;
	document.shop.ship[0].checked=true; var route="regular";
}}


var cx=""; 
//if(cx =="") {var cx="6";} cx=cx*1;


	if (gr > 0) {
	if(route =="self") {vx=0.00;} else {
	if(route =="vor") {vxx=document.shop.tnt.value; vx=ziffern(vxx); 
		if(vxx != vx) {document.shop.tnt.value=vx;}
		vx=vx*1;} else {
	if((route =="local")&&(tot >= 50)) {vx=0.00;} else {
	if(route =="local") {vx=3.50;} else {

if(route =="regular") { v1=12.50; v2=1.10; vx=0;
	base=getCountry(document.shop.recCountry.value,'base');
	ad=getCountry(document.shop.recCountry.value,'ad');
	if(base) {v1=base;  v1=v1*1;} 	if(ad) {v2=ad; v2=v2*1;}

	document.getElementById("firstkg").innerHTML=v1;
	document.getElementById("ad500").innerHTML=v2;

	shipsec=gr-1000; grx=shipsec; 
	while (grx >0) {vx=vx + v2; grx=grx-500;}
}


if((route =="express")&&(cx !="")) {
	if(cx ==1) {v1=32.61; v2=4.66; v3=3.49;}
	if(cx ==2) {v1=41.93; v2=5.82; v3=4.66;}
	if(cx ==3) {v1=53.58; v2=11.65; v3=8.15;}
	if(cx ==4) {v1=58.23; v2=11.65; v3=8.15;}

	vx=0; limit=5000; 
	if (gr >500) {grx=500;
		while (grx < gr) {grx=grx+500;
		if(grx <= limit) {vx=vx+v2;} 
		if(grx > limit) {vx=vx+v3;} 
		}}
}


	}}}}}


if((route =="vor")&&(vx <1)) {
	error ="please insert the VOR/TNT charge\n";
	alert(error);
}

if(tot =="") {tot=0;}
shipeuro=v1+vx; 

	var tarship=document.shop.tarship.value;
	if((tarship !="")&&(tarship >0)) {tarship=tarship*1; shipeuro=shipeuro*1;
	xshipeuro=shipeuro/100*tarship; shipeuro=shipeuro-xshipeuro;}

shipeuro=currency(shipeuro);
document.shop.amship.value=shipeuro;
var tot=tot*1; var shipeuro=shipeuro*1; var amx=tot+shipeuro;
amx=currency(amx);
document.shop.amtot.value=amx;
}


function currency(currval) {if(currval<0.01) {currval="0.00";}
str=""+currval; pos= str.indexOf("."); 
if (pos<0) {str=str+".00";} else {str=str.substring(0,pos+3);}
dec=str.substring(pos,str.length); if(dec.length==2) {str +="0";} 
return str;
}



function ziffern(cval) {
cval=""+cval; cval=inOut(' ','',cval); cval=inOut(',','.',cval);
if(cval<0.01) {cval="0.00";}

var valid = "0123456789."; var tx; var ph=""; 
	for (var i=0; i<cval.length; i++) {
	tx = "" + cval.substring(i, i+1);
	if (valid.indexOf(tx) != -1) {ph +=tx;}
	}

ph=currency(ph);
return ph;
}


function chkquest() {
var name=document.quest.name.value;
var house=document.quest.house.value;
var street1=document.quest.street1.value;
var street2=document.quest.street2.value;
var city=document.quest.city.value;
var country=document.quest.country.value;
var email=document.quest.email.value;
var vehmak=document.quest.vehmak.value;
var vehic=document.quest.vehic.value;
var engine=document.quest.engine.value;
var manu=document.quest.manu.value;


var error="";

if(name =="") {error +="Name/Surname is missing\n";}
if(house =="") {error +="House No/Name is missing\n";}
if((street1 =="")&&(street2 =="")) {error +="Address is missing\n";}
if(city =="") {error +="Town is missing\n";}
if(country =="") {error +="Country is missing\n";}
if(email =="") {error +="E-Mail is missing\n";}
else {if((email.indexOf('@') == -1) || (email.indexOf('.') == -1)) {error +="please check E-Mail\n";}}

if(error != "") {error +="\n";}
if(vehmak =="") {error +="Vehicle Make is missing\n";}
if(vehic =="") {error +="Vehicle Model is missing\n";}
if(engine =="") {error +="Engine is missing\n";}
if(manu =="") {error +="Manufacture year is missing\n";}


if(error != "") {alert(error); return false;} 
else {return true;}
}


//Disable right mouse click Script
var message="right mouse function disabled ...";

function clickIE4(){if (event.button==2){alert(message); return false;}}

function clickNS4(e){
if (document.layers||document.getElementById&&!document.all){
if (e.which==2||e.which==3){alert(message); return false;}}
}


	this_location = document.location.toString();
	if((this_location.indexOf('127.0.0.1') == -1)&&(this_location.indexOf('87.230.33.157') == -1)) {

if (document.layers){
document.captureEvents(Event.MOUSEDOWN);
document.onmousedown=clickNS4;}

else if (document.all&&!document.getElementById){
document.onmousedown=clickIE4;}

document.oncontextmenu=new Function("alert(message);return false")
	}


document.write("<LINK REL='stylesheet' HREF='/font_ie.css' TYPE='text/css'>");
document.write("<LINK REL='stylesheet' HREF='/font.css' TYPE='text/css'>");
// -->






