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_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'block':(v=='hide')?'none':v; }
    obj.display=v; }
}

function ReadForm (obj1, tst) { // process text fields
var i,des="",obj,val,tag,op1a="",op1b="",op2a="",op2b="";


 if (obj1.baseon0) op1a = obj1.baseon0.value;
  if (obj1.baseos0) op1b = obj1.baseos0.value;
  if (obj1.baseon1) op2a = obj1.baseon1.value;
  if (obj1.baseos1) op2b = obj1.baseos1.value;
  if (obj1.basedes) des  = obj1.basedes.value;  
  for (i=0; i<obj1.length; i++) { // run entire form
    obj = obj1.elements[i];       // a form element
	
    if (obj.type == "text" )   // just read text data
     {
		  val = obj.value;            // get the data
		  if (tst == true &&          // only on final submit
			  val == "") 
			{          
			alert ("Please specify the size you would like your laptop skin to be!\n\nWe can make your laptop skin whatever size you want. If you're not sure, just tell us your laptop model.\n\nExample: 10\" x 8\", 30cm x 20cm, 17\" Macbook pro, ...");  // alert ("Enter data for " + obj.name);
			return false;
		    }
         
		  tag = obj.name.substring (obj.name.length-2);  // get flag

		  if (des.length == 0) des = val;
		  else {if (obj.name != "os0") { des = des + " with Skin Text :- " + val;} }
    }
  }
  obj1.item_name.value = des;  // stuff fields
if (op1a.length > 0) obj1.on0.value = op1a;
  if (op1b.length > 0) obj1.os0.value = op1b;
  if (op2a.length > 0) obj1.on1.value = op2a;
}

function faqsausschalten () {
MM_showHideLayers('whatsalaptopskin','','hide','willitfitmylaptop','','hide','willibeable','','hide','howlongdoesittake','','hide','howdoiapplymylaptopskin','','hide','howdoipay','','hide','quantitydiscounts','','hide','vat','','hide','whoislaptopskinsnet','','hide','shipping','','hide','whyaspoke','','hide')
}

function bestellformular (size) {
	if (size == "custom")
		{ 
			MM_showHideLayers('custom-1','','show','custom-2','','show','custom-3','','show','custom-4','','show','custom-5','','show','custom-6','','show','custom-7','','show','custom-8','','show','custom-9','','show','howtomeasure-1','','show','howtomeasure-2','','show','howtomeasure-3','','show','howtomeasure-4','','show','howtomeasure-5','','show','howtomeasure-6','','show','howtomeasure-7','','show','howtomeasure-8','','show','howtomeasure-9','','show','sizingchart-1','','hide','sizingchart-2','','hide','sizingchart-3','','hide','sizingchart-4','','hide','sizingchart-5','','hide','sizingchart-6','','hide','sizingchart-7','','hide','sizingchart-8','','hide','sizingchart-9','','hide');
			}
	else
		{
			MM_showHideLayers('custom-1','','hide','custom-2','','hide','custom-3','','hide','custom-4','','hide','custom-5','','hide','custom-6','','hide','custom-7','','hide','custom-8','','hide','custom-9','','hide','howtomeasure-1','','hide','howtomeasure-2','','hide','howtomeasure-3','','hide','howtomeasure-4','','hide','howtomeasure-5','','hide','howtomeasure-6','','hide','howtomeasure-7','','hide','howtomeasure-8','','hide','howtomeasure-9','','hide','sizingchart-1','','show','sizingchart-2','','show','sizingchart-3','','show','sizingchart-4','','show','sizingchart-5','','show','sizingchart-6','','show','sizingchart-7','','show','sizingchart-8','','show','sizingchart-9','','show');
			}
}