<!--
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_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_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 Inventario(){
	var sizeprodt = document.getElementById("select_11");
	if (sizeprodt != null)
	{
	var sizeproducto = document.getElementById("select_11").value;
	}
	
	var sizeprodta = document.getElementById("select_a11");
	if (sizeprodta != null)
	{
	var sizeproducto = document.getElementById("select_a11").value;
	}
	
	var sizeprodtb = document.getElementById("select_b11");
	if (sizeprodtb != null)
	{
	var sizeproducto = document.getElementById("select_b11").value;
	}


	
	var codigoprod = document.getElementById("select_10");
	if (codigoprod != null)
	{
	var codigoprod = document.getElementById("select_10").value;
	}


	
	var productElementfin = document.getElementById("fin");
	if (productElementfin != null)
	{
	var fin1 = document.getElementById("fin").value;
		if (fin1 == 1){
			fin2 = "-SF";
		} else {
			fin2 = "";	
		};
	}
	
	
		var idproducto = document.getElementById("productid").value;
	getdata('http://www.catchsurf.com/inventory/check.php?id='+idproducto+"-"+codigoprod+"-"+sizeproducto+fin2,'inventory');
}
	

			



		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; 
		if (a[i+2] != ""){
			var vistaactual = document.getElementById("vista").value;

			var productElementfin = document.getElementById("fin");
			if (productElementfin != null)
			{
			var fin1 = document.getElementById("fin").value;
			if (fin1 == 1){
				fin = "SF-";
				fin2 = "-SF";
			} else {
				if (fin1 == 2){
					fin = "TF-";
					fin2 = "-TF";
				} else {
					fin = "";
					fin2 = "";	
				}
				
				
			};
			}
			
			var productElement16 = document.getElementById("pad");
			if (productElement16 != null)
			{
			pad = document.getElementById("pad").value;
			} else {
				pad = "";
			}
			
			
			
			var productoidddd = document.getElementById("productid").value;
			
					if ((productoidddd == 87)){
						if ((a[i+2] == 75)){
							$j(".add-to-cart").hide();
							$j(".brnsoldout").show();
						} else {
							$j(".add-to-cart").show();
							$j(".brnsoldout").hide();
						}
						
						if ((a[i+2] == 75)){
							$j('#select_a11').empty();
							$j('#select_a11').append('<option value="">Select Size</option>');
							$j('#select_a11').append('<option value="38">M (7.0-8.5) </option>');
							$j('#select_a11').append('<option value="37">ML (9.0-10.5) </option>');
							$j('#select_a11').append('<option value="36">L (11.0-12.5) </option>');
							
							
						}
						if ((a[i+2] == 35)){
							$j('#select_a11').empty();
							$j('#select_a11').append('<option value="">Select Size</option>');
							$j('#select_a11').append('<option value="38">M (7.0-8.5) </option>');
							$j('#select_a11').append('<option value="37">ML (9.0-10.5) </option>');
							$j('#select_a11').append('<option value="36">L (11.0-12.5) </option>');
						}
						
						if ((a[i+2] == 34)){
							$j('#select_a11').empty();
							$j('#select_a11').append('<option value="">Select Size</option>');
							$j('#select_a11').append('<option value="40">S (4.5-6.0)</option>');
							$j('#select_a11').append('<option value="38">M (7.0-8.5) </option>');
							$j('#select_a11').append('<option value="37">ML (9.0-10.5) </option>');
							$j('#select_a11').append('<option value="36">L (11.0-12.5) </option>');
						}
						
						if ((a[i+2] == 73)){
							$j('#select_a11').empty();
							$j('#select_a11').append('<option value="">Select Size</option>');
							$j('#select_a11').append('<option value="38">M (7.0-8.5) </option>');
						}
						
						if ((a[i+2] == 74)){
							$j('#select_a11').empty();
							$j('#select_a11').append('<option value="">Select Size</option>');
							$j('#select_a11').append('<option value="38">M (7.0-8.5) </option>');
							$j('#select_a11').append('<option value="36">L (11.0-12.5) </option>');
						}
						
						
						
						
					}  


		x.src="../images-products/"+productoidddd+"-"+fin+"1-"+a[i+2]+pad+".jpg";

		document.getElementById("mojozoom_img").src = "../images-products/"+productoidddd+"-"+fin+"1-"+a[i+2]+pad+"_h.jpg";

		if (a[i+1] != "")
		{
		document.getElementById("vista").value=a[i+1];
	};


		document.getElementById("vista1").className = "vista_select";
		document.getElementById("vista2").className = "vista";
		document.getElementById("vista3").className = "vista";	


		var productElement1 = document.getElementById("select_1");
		if (productElement1 != null)
		{
		document.getElementById("select_1").value=a[i+2];
		}
		var productElement2 = document.getElementById("select_4");
		if (productElement2 != null)
		{
		document.getElementById("select_4").value=a[i+2];
		}

		var productElement3 = document.getElementById("select_7");
		if (productElement3 != null)
		{
		document.getElementById("select_7").value=a[i+2];
		}

		var productElement4 = document.getElementById("select_9");
		if (productElement4 != null)
		{
		document.getElementById("select_9").value=a[i+2];
		}
		var productElement5 = document.getElementById("select_10");
		if (productElement5 != null)
		{
		document.getElementById("select_10").value=a[i+2];
		}
		var productElement6 = document.getElementById("select_15");
		if (productElement6 != null)
		{
		document.getElementById("select_15").value=a[i+2];
		}
		
		

};

		}
Inventario();
	}
	
	
		function swapImageOdysea(destino, nn, color, dd) { //v3.0
			//alert("nuevo");
			if (color==""){
			var color = document.getElementById("select_10").value;	
			}
			
			
			var vistaactual = document.getElementById("vista").value;
			var medida = document.getElementById("select_11").value;
			if (medida != ""){
				medida = "-"+medida;
			}
			var productElementfin = document.getElementById("fin");
			if (productElementfin != null)
			{
			var fin1 = document.getElementById("fin").value;
			if (fin1 == 1){
				fin = "SF-";
				fin2 = "-SF";
			} else {
				fin = "";
				fin2 = "";	
			};
			}
			
			var productElement16 = document.getElementById("pad");
			if (productElement16 != null)
			{
			pad = document.getElementById("pad").value;
			} else {
				pad = "";
			}
			
			
			
			var productoidddd = document.getElementById("productid").value;


		document.getElementById(destino).src="../images-products/"+productoidddd+"-"+fin+"1-"+color+medida+".jpg";

		document.getElementById("mojozoom_img").src = "../images-products/"+productoidddd+"-"+fin+"1-"+color+medida+"_h.jpg";

		if (nn != "")
		{
		document.getElementById("vista").value=nn;
	};


		document.getElementById("vista1").className = "vista_select";
		document.getElementById("vista2").className = "vista";
		document.getElementById("vista3").className = "vista";	

		document.getElementById("select_10").value=color;


		opConfig2.reloadPrice();
		Inventario();
	}




function FinNuevo(as) {
	
	if (as == 15){
finlessNuevo();
	} else {
		singlefinNuevo();
	};

};



	
	function tractionpadNuevo() {
		var productElement1 = document.getElementById("pad");
		if (productElement1 != null)
		{
		pad = document.getElementById("pad").value;
		}
		
		if (pad != "-pad"){
			document.getElementById("tractionpad").className = "tractionpad-selected";
			document.getElementById("pad").value="-pad";
			document.getElementById("select_19").value=57;
			pad = "-pad";
		} else {
			document.getElementById("tractionpad").className = "tractionpad";
			document.getElementById("pad").value="";
			document.getElementById("select_19").value=56;
			pad = "";
		}
		
		var productElementfin = document.getElementById("fin");
		if (productElementfin != null)
		{
		var fin1 = document.getElementById("fin").value;
		if (fin1 == 1){
			fin = "SF-";
			fin2 = "-SF";
		} else {
			fin = "";
			fin2 = "";	
		};
		}
		var productElement5 = document.getElementById("select_10");
		if (productElement5 != null)
		{
		valorfoto = document.getElementById("select_10").value;
		}
		
		var productoidddd = document.getElementById("productid").value;

		document.getElementById("mojozoom_img").src = "../images-products/"+productoidddd+"-"+fin+"1-"+valorfoto+pad+"_h.jpg";

		document.getElementById("myimage").src = "../images-products/"+productoidddd+"-"+fin+"1-"+valorfoto+pad+".jpg";
		
		document.getElementById("vista1").className = "vista_select";
		document.getElementById("vista2").className = "vista";
		document.getElementById("vista3").className = "vista";


		Inventario();
		opConfig.reloadPrice();
		
		}
		
		function singlefinNuevo() {
		document.getElementById("singlefin").className = "singlefin-selected";
		document.getElementById("twinfin").className = "twinfin";
		document.getElementById("finless").className = "finless";
		document.getElementById("select_12").value=16;
		document.getElementById("fin").value=1;
		
		var productElement1 = document.getElementById("select_1");
		if (productElement1 != null)
		{
		valorfoto = document.getElementById("select_1").value;
		}
		var productElement2 = document.getElementById("select_4");
		if (productElement2 != null)
		{
		valorfoto = document.getElementById("select_4").value;
		}

		var productElement3 = document.getElementById("select_7");
		if (productElement3 != null)
		{
		valorfoto = document.getElementById("select_7").value;
		}

		var productElement4 = document.getElementById("select_9");
		if (productElement4 != null)
		{
		valorfoto = document.getElementById("select_9").value;
		}
		
		var productElement5 = document.getElementById("select_10");
		if (productElement5 != null)
		{
		valorfoto = document.getElementById("select_10").value;
		}
		
		var productElement6 = document.getElementById("pad");
		if (productElement6 != null)
		{
		pad = document.getElementById("pad").value;
		} else {
			pad = "";
		}
		
			var productoidddd = document.getElementById("productid").value;

	
		
		document.getElementById("mojozoom_img").src = "../images-products/"+productoidddd+"-SF-1-"+valorfoto+pad+"_h.jpg";

			document.getElementById("myimage").src = "../images-products/"+productoidddd+"-SF-1-"+valorfoto+pad+".jpg";
			
			document.getElementById("vista1").className = "vista_select";
			document.getElementById("vista2").className = "vista";
			document.getElementById("vista3").className = "vista";
			Inventario();
			opConfig.reloadPrice();

	};
	
	
		function twinfinNuevo() {
		document.getElementById("singlefin").className = "singlefin";
		document.getElementById("twinfin").className = "twinfin-selected";
		document.getElementById("finless").className = "finless";
		document.getElementById("select_12").value=96;
		document.getElementById("fin").value=2;
		
		var productElement1 = document.getElementById("select_1");
		if (productElement1 != null)
		{
		valorfoto = document.getElementById("select_1").value;
		}
		var productElement2 = document.getElementById("select_4");
		if (productElement2 != null)
		{
		valorfoto = document.getElementById("select_4").value;
		}

		var productElement3 = document.getElementById("select_7");
		if (productElement3 != null)
		{
		valorfoto = document.getElementById("select_7").value;
		}

		var productElement4 = document.getElementById("select_9");
		if (productElement4 != null)
		{
		valorfoto = document.getElementById("select_9").value;
		}
		
		var productElement5 = document.getElementById("select_10");
		if (productElement5 != null)
		{
		valorfoto = document.getElementById("select_10").value;
		}
		
		var productElement6 = document.getElementById("pad");
		if (productElement6 != null)
		{
		pad = document.getElementById("pad").value;
		} else {
			pad = "";
		}
		
			var productoidddd = document.getElementById("productid").value;

	
		
		document.getElementById("mojozoom_img").src = "../images-products/"+productoidddd+"-TF-1-"+valorfoto+pad+"_h.jpg";

			document.getElementById("myimage").src = "../images-products/"+productoidddd+"-TF-1-"+valorfoto+pad+".jpg";
			
			document.getElementById("vista1").className = "vista_select";
			document.getElementById("vista2").className = "vista";
			document.getElementById("vista3").className = "vista";
			Inventario();
			opConfig.reloadPrice();

	};
	
	
	function finlessNuevo() {
		document.getElementById("twinfin").className = "twinfin";
		document.getElementById("singlefin").className = "singlefin";
		document.getElementById("finless").className = "finless-selected";
		document.getElementById("select_12").value=15;
		document.getElementById("fin").value=0;
		var productElement1 = document.getElementById("select_1");
		if (productElement1 != null)
		{
		valorfoto = document.getElementById("select_1").value;
		}
		var productElement2 = document.getElementById("select_4");
		if (productElement2 != null)
		{
		valorfoto = document.getElementById("select_4").value;
		}

		var productElement3 = document.getElementById("select_7");
		if (productElement3 != null)
		{
		valorfoto = document.getElementById("select_7").value;
		}

		var productElement4 = document.getElementById("select_9");
		if (productElement4 != null)
		{
		valorfoto = document.getElementById("select_9").value;
		}
		
		var productElement5 = document.getElementById("select_10");
		if (productElement5 != null)
		{
		valorfoto = document.getElementById("select_10").value;
		}
		
		var productElement6 = document.getElementById("pad");
		if (productElement6 != null)
		{
		pad = document.getElementById("pad").value;
		} else {
			pad = "";
		}
		
		
			var productoidddd = document.getElementById("productid").value;

			
		
		document.getElementById("mojozoom_img").src = "../images-products/"+productoidddd+"-1-"+valorfoto+pad+"_h.jpg";

			document.getElementById("myimage").src = "../images-products/"+productoidddd+"-1-"+valorfoto+pad+".jpg";
			document.getElementById("vista1").className = "vista_select";
			document.getElementById("vista2").className = "vista";
			document.getElementById("vista3").className = "vista";
			Inventario();
			opConfig.reloadPrice();

	};
	
	
	
	
			
	function cambiavistaNuevo(a1, a2) { //v3.0
				var valorfoto = "";

				var productElement1 = document.getElementById("select_1");
				if (productElement1 != null)
				{
				valorfoto = document.getElementById("select_1").value;
				}
				var productElement2 = document.getElementById("select_4");
				if (productElement2 != null)
				{
				valorfoto = document.getElementById("select_4").value;
				}

				var productElement3 = document.getElementById("select_7");
				if (productElement3 != null)
				{
				valorfoto = document.getElementById("select_7").value;
				}

				var productElement4 = document.getElementById("select_9");
				if (productElement4 != null)
				{
				valorfoto = document.getElementById("select_9").value;
				}

				var productElement5 = document.getElementById("select_10");
				if (productElement5 != null)
				{
				valorfoto = document.getElementById("select_10").value;
				}

				var productElement6 = document.getElementById("select_15");
				if (productElement6 != null)
				{
				valorfoto = document.getElementById("select_15").value;
				}
				

				

					var productElementfin = document.getElementById("fin");
					if (productElementfin != null)
					{
					var fin1 = document.getElementById("fin").value;
					if (fin1 == 1){
						fin = "SF-";
					} else {
						if (fin1 == 2){
							fin = "TF-";
						} else {
							fin = "";	
						}
						
						
					};
					} else {

						fin = "";
					}



					var vistaactual = document.getElementById("vista").value;
		document.getElementById("vista").value=a2;
		
		var productElement16 = document.getElementById("pad");
		if (productElement16 != null)
		{
		pad1 = document.getElementById("pad").value;
		} else {
			pad1 = "";
		}

		if (a2 == 1){
			pad=pad1;
			document.getElementById("vista1").className = "vista_select";
			document.getElementById("vista2").className = "vista";
			document.getElementById("vista3").className = "vista";	
		}
		if (a2 == 2){
			pad="";
			document.getElementById("vista1").className = "vista";
			document.getElementById("vista2").className = "vista_select";
			document.getElementById("vista3").className = "vista";	
		}

		if (a2 == 3){
			pad="";
			document.getElementById("vista1").className = "vista";
			document.getElementById("vista2").className = "vista";
			document.getElementById("vista3").className = "vista_select";	
		}

			var productoidddd = document.getElementById("productid").value;

			
	

			document.getElementById("mojozoom_img").src = "../images-products/"+productoidddd+"-"+fin+a2+"-"+valorfoto+pad+"_h.jpg";

				document.getElementById("myimage").src = "../images-products/"+productoidddd+"-"+fin+a2+"-"+valorfoto+pad+".jpg";



				};


				function cambiavistaNuevo2(a1, a2) { //v3.0
					var fin = "";
							var productElement5 = document.getElementById("select_10");
							if (productElement5 != null)
							{
							valorfoto = document.getElementById("select_10").value;
							}


								var vistaactual = document.getElementById("vista").value;
					document.getElementById("vista").value=a2;

					var productElement16 = document.getElementById("pad");
					if (productElement16 != null)
					{
					pad1 = document.getElementById("pad").value;
					} else {
						pad1 = "";
					}

					if (a2 == 1){
						pad=pad1;
						document.getElementById("vista1").className = "vista_select";
						document.getElementById("vista2").className = "vista";
						document.getElementById("vista3").className = "vista";	
					}
					if (a2 == 2){
						pad="";
						document.getElementById("vista1").className = "vista";
						document.getElementById("vista2").className = "vista_select";
						document.getElementById("vista3").className = "vista";	
					}

					if (a2 == 3){
						pad="";
						document.getElementById("vista1").className = "vista";
						document.getElementById("vista2").className = "vista";
						document.getElementById("vista3").className = "vista_select";	
					}

						var productoidddd = document.getElementById("productid").value;

						var medida = document.getElementById("select_11").value;
						
						if (medida != ""){
							medida = "-"+medida;
						} else {
							medida = "-48";
						}


						document.getElementById("mojozoom_img").src = "../images-products/"+productoidddd+"-"+fin+a2+"-"+valorfoto+pad+medida+"_h.jpg";

						document.getElementById("myimage").src = "../images-products/"+productoidddd+"-"+fin+a2+"-"+valorfoto+pad+medida+".jpg";



							};



				function swapImgRestore4(dest, link) { //v3.0
				document.getElementById(dest).src = link;
				}

				function swapImage4(dest, link) { //v3.0
				document.getElementById(dest).src = link;

				}
				
				
				function showaddcart() {
				if (document.getElementById) { // DOM3 = IE5, NS6
				document.getElementById('addcart').style.visibility = 'visible';
				}
				else {
				if (document.layers) { // Netscape 4
				document.addcart.visibility = 'visible';
				}
				else { // IE 4
				document.all.addcart.style.visibility = 'visible';
				}
				}
				}

				function hideaddcart() {
				if (document.getElementById) { // DOM3 = IE5, NS6
				document.getElementById('addcart').style.visibility = 'hidden';
				}
				else {
				if (document.layers) { // Netscape 4
				document.addcart.visibility = 'hidden';
				}
				else { // IE 4
				document.all.addcart.style.visibility = 'hidden';
				}
				}



				}

				function hidem11() {

				if (document.getElementById) { // DOM3 = IE5, NS6
				document.getElementById('addthis').style.visibility = 'hidden';
				}
				else {
				if (document.layers) { // Netscape 4
				document.addthis.visibility = 'hidden';
				}
				else { // IE 4
				document.all.addthis.style.visibility = 'hidden';
				}
				}
				}
				function changeClass( idref, classname ) {   
				 var el = document.getElementById(idref); 
				 var attributeNode = el.getAttributeNode("class"); 
				 if( attributeNode ) { attributeNode.value = classname; } 
				 else { el.setAttribute("class", classname); } 
				}


				function seleccioSte() {
					changeClass('select_17','required-entry product-custom-option');
				}




				function hidediv() {

				if (document.getElementById) { // DOM3 = IE5, NS6
				document.getElementById('addthis').style.visibility = 'hidden';
				}
				else {
				if (document.layers) { // Netscape 4
				document.addthis.visibility = 'hidden';
				}
				else { // IE 4
				document.all.addthis.style.visibility = 'hidden';
				}
				}
				}


				function showdiv() {
					//showaddcart();
				if (document.getElementById) { // DOM3 = IE5, NS6
				document.getElementById('addthis').style.visibility = 'visible';
				}
				else {
				if (document.layers) { // Netscape 4
				document.addthis.visibility = 'visible';

				}
				else { // IE 4
				document.all.addthis.style.visibility = 'visible';
				}
				}
				}



				function hideinv() {

				if (document.getElementById) { // DOM3 = IE5, NS6
				document.getElementById('inventario').style.visibility = 'hidden';
				}
				else {
				if (document.layers) { // Netscape 4
				document.inventario.visibility = 'hidden';
				}
				else { // IE 4
				document.all.inventario.style.visibility = 'hidden';
				}
				}
				}


				function showinv() {
					//showaddcart();
				if (document.getElementById) { // DOM3 = IE5, NS6
				document.getElementById('inventario').style.visibility = 'visible';
				}
				else {
				if (document.layers) { // Netscape 4
				document.inventario.visibility = 'visible';

				}
				else { // IE 4
				document.all.inventario.style.visibility = 'visible';
				}
				}
				}
