
/* - shop.js - */
// JavaScript Document
//version 2011 2
function backChange() {


posiY=document.getElementById("sel_color").selectedIndex*400;
document.getElementById('imagedisplay').style.backgroundPosition="0px -"+posiY+"px";

}

function checkselection(what) {
document.theForm.action =what;
}

function checkform() {
valid=true;


if(document.theForm.colors.selectedIndex == -1) {
    alert ("Please choose a color!");
    valid=false;
} else if (document.getElementById("sel_size") != null) {
if(document.theForm.colors.selectedIndex == -1 && document.theForm.options.selectedIndex == -1) {
    alert ("Please choose a color and a size!");
    valid=false;
} else	
if(document.theForm.options.selectedIndex == -1) {
    alert ("Please choose a size!");
    valid=false;
} 
}

return valid;
}
function sizeinfo(onoff) {

document.getElementById("infobox").innerHTML = "<h2>what is my size?</h2>inner diameter:<br />regular: 64mm (=2,52 inch)<br />large: 70mm (=2,76 inch)<br /><br /><br /><strong>hint:</strong>use a bracelet that fits your arm and measure it for comparisson to our available sizes."
document.getElementById("infobox").style.top="140px";
document.getElementById("infobox").style.left="230px";
document.getElementById("infobox").style.width="230px";
if(onoff) {
document.getElementById("infobox").style.visibility = "visible"; } else { document.getElementById("infobox").style.visibility = "hidden"; }
}

function eurocalc(onoff) {
preis = document.getElementById("price").innerHTML;
preis2=preis.slice(1, preis.length-2);
USDpreis=Math.round(preis2/0.719904);
GBPpreis=Math.round(preis2/1.16015);
CHFpreis=Math.round(preis2/0.659673);
JPYpreis=Math.round(preis2/0.00732503);
CNYpreis=Math.round(preis2/0.105370);
AUDpreis=Math.round(preis2/0.569921);
document.getElementById("infobox").innerHTML = "<h2>currency calculation</h2>this items price is "+preis+"EUR<br />all prices in other currencies are calculated with the official exchange rates and act just as approximate values!<br /><br />~ "+USDpreis+".00 US Dollar <br />~ "+GBPpreis+".00 Great Britain Pound <br />~ "+CHFpreis+".00 Swiss Francs <br />~ "+JPYpreis+".00 Japanese Yen <br />~ "+CNYpreis+".00 Chinese Yuan<br />~ "+AUDpreis+".00 Australian Dollar<br /><br />in the payment process via creditcard / paypal all currencies are exchanged according to paypal's exchange policy.";
document.getElementById("infobox").style.top="200px";
document.getElementById("infobox").style.left="170px";
document.getElementById("infobox").style.width="330px";
if(onoff) {
document.getElementById("infobox").style.visibility = "visible"; } else { document.getElementById("infobox").style.visibility = "hidden"; }
}


