// JavaScript Document
<!--
var win=null;
function NewWindow(mypage,myname,w,h,scroll,menubar,pos){
if(pos=="random"){LeftPosition=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;TopPosition=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;}
if(pos=="center"){LeftPosition=(screen.width)?(screen.width-w)/2:100;TopPosition=(screen.height)?(screen.height-h)/2:100;}
else if((pos!="center" && pos!="random") || pos==null){LeftPosition=0;TopPosition=20}
settings='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',location=no,directories=no,status=no,menubar='+menubar+',toolbar=no,resizable=yes';
win=window.open(mypage,myname,settings);}

function checkProducts() {
	if((document.getElementById('0815-1').value + document.getElementById('0815-2').value + document.getElementById('0815-3').value + document.getElementById('0815-4').value  + document.getElementById('0815-5').value + document.getElementById('0815-6').value + document.getElementById('0815-7').value + document.getElementById('0815-8').value + document.getElementById('0815-9').value + document.getElementById('0815-10').value + document.getElementById('08vs15-Damen-Shirt-kurzarm').value + document.getElementById('08vs15-Damen-Shirt-langarm').value + document.getElementById('08vs15-Herren-Shirt-kurzarm').value + document.getElementById('08vs15-Herren-Shirt-langarm').value + document.getElementById('0815-10+').value + document.getElementById('cardboard').value + document.getElementById('specialedition').value + document.getElementById('minus8_slowmotion').value + document.getElementById('mergeofequals').value + document.getElementById('neolounge').value + document.getElementById('0815-seefeld').value < 1)) {
		alert('Bitte geben Sie eine Produktanzahl an.');
		return false;
	} else if (document.getElementById('Name').value == "" || document.getElementById('Vorname').value == "" || document.getElementById('Strasse').value == "" || document.getElementById('Ort').value == "" || document.getElementById('email').value == "") {
		alert('Bitte Adresse komplett angeben.');
		return false;
	} else {
		return true;
	}
}

function addTotal() {

	p1 = document.getElementById('0815-1').value * 33;
	p2 = document.getElementById('0815-2').value * 33;
	p3 = document.getElementById('0815-3').value * 33;
	p4 = document.getElementById('0815-4').value * 33;
	p5 = document.getElementById('0815-5').value * 33;
	p6 = document.getElementById('0815-6').value * 33;
	p7 = document.getElementById('0815-7').value * 33;
	p8 = document.getElementById('0815-8').value * 33;
	p9 = document.getElementById('0815-9').value * 33;
	p10 = document.getElementById('0815-10').value * 33;
	p11 = document.getElementById('08vs15-Damen-Shirt-kurzarm').value * 49;
	p12 = document.getElementById('08vs15-Damen-Shirt-langarm').value * 49;
	p13 = document.getElementById('08vs15-Herren-Shirt-kurzarm').value * 49;
	p14 = document.getElementById('08vs15-Herren-Shirt-langarm').value * 49;
	p18 = document.getElementById('0815-Kinder-Shirt-langarm').value * 49;
	p15 = document.getElementById('0815-10+').value * 39;
	p16 = document.getElementById('cardboard').value * 15;
	if(document.getElementById('specialedition').value >= 1) {
		p17 = 460;
	} else {
		p17 = 0;
	}
	p19 = document.getElementById('minus8_slowmotion').value * 25;
	p20 = document.getElementById('mergeofequals').value * 25;
	p21 = document.getElementById('neolounge').value * 25;
	p22 = document.getElementById('0815-seefeld').value * 38;

	//	total
	tot = p1 + p2 + p3 + p4 + p5 + p6 + p7 + p8 + p9 + p10 + p11 + p12 + p13 + p14 + p15 + p16 + p17 + p18 + p19 + p20 + p21 + p22 ;
	if(tot > 0) {
		document.getElementById('total').innerHTML = 'Total ' + tot + ' CHF';
	}
}
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function swapImage(platzhalter,bild) { //v3.0
/*	document.getElementById(platzhalter).innerHTML = '<img src="'+ bild +'">';
alert(document.getElementById(platzhalter).align);
*/
	document.getElementById(platzhalter).src = bild;
}
function swapImgRestore(platzhalter) { //v3.0
	document.getElementById(platzhalter).innerHTML = '&nbsp;';
}

function test() {
	document.getElementById('x14').innerHTML = 'here';
}
function doSend() {
 // (Formular lokal manipulieren und abschicken
xajax.$('submitButton').disabled=true;
xajax.$('submitButton').value="Bitte warten...";
xajax_processForm(xajax.getFormValues("sendeForm"));
return false;
}

function xajax_insertContent(kennung) {
	if(kennung) {
	xajax_replaceContent(kennung);
	} else {
	xajax_replaceContent(1);	
	}
}

function call(num)
{
   xajax_replaceContent(num);
}
function callExternalInterface(soundToPlay) {
    thisMovie("ExternalInterface").playSound(soundToPlay);
}

function thisMovie(movieName) {
    if (navigator.appName.indexOf("Microsoft") != -1) {
        return window[movieName]
    }
    else {
        return document[movieName]
    }
}



// -->