
	// Product Image Popup
	function zoom(modelCd, imageType ){
		if (imageType != "") {
			var imagepopup = window.open("/products/category/image/" + modelCd + "_" + imageType + ".jhtml", "imagepopup", "scrollbars=yes,resizable=yes,width=517,height=370,top=0,left=0");
			imagepopup.focus();
		}
	}
 

	// Select a Category
	function goAttribute() {
		var myform = eval('document.ProductForm');

		if (myform.attribute01.value == '') {
			alert("Empty!");
		} else {
			myform.actType.value  = "list";
			myform.action         = "/md/product/prodcategorylist.jhtml";
			myform.submit();
		}
	}

	// Select a Model
	function goModel(modelCd) {
		var myform = eval('document.ProductForm');

		if (modelCd == '') {
			alert("Empty!");
		} else {
			goModelDetail(modelCd);
		}
	}

	// Select a Model Detail
	function goModelCommon(modelId) {
		var myform = eval('document.ProductForm');

		myform.selectModel.value = modelId;

		if (myform.selectModel.value == '') {
			alert("Empty!");
		} else {
			goModelDetail(myform.selectModel.value);
		}
	}


	// Product Detail
	function goModelDetail( productId ){
		location.href = "/products/model/detail/" + currUrlCategory + productId + ".jhtml";
	}

	// Product Detail2
	function goModelDetail2( productId ){
		opener.opener.location.href = "/products/model/detail/" + currUrlCategory + productId + ".jhtml";
		opener.opener.focus();
		self.close();
		opener.close();
	}

	// Product Detail Parent page Move
	function goModelDetailParent( productId ){
		var myform = eval('window.opener.document.ProductForm');

		myform.actType.value    = "detail";
		myform.productId.value  = productId;
		myform.action           = "/md/product/prodcategorylist.jhtml";
		myform.submit();
		window.close();
	}

	// Select a Category Value Init
	function goInit(att01) {
		if (att01 != "") {
			var myform = eval('document.ProductForm');
			myform.attribute01.value = att01;
		}
	}

	// Image Rolling
	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];}
	}

	// Features, Spec Display
	function showThis(tabId) {
		if (document.getElementById) {
		//if (document.all) {
			/*featuresTab         = eval("document.all.features.style")
			specsTab            = eval("document.all.spec.style")
			accessariesTab      = eval("document.all.accessorie.style")
			featureContents     = eval("document.all.featurescon.style")
			spec1Contents       = eval("document.all.speccon.style")
			accessariContents   = eval("document.all.accessoriecon.style")*/

			featuresTab         = eval('document.getElementById("features").style');
			specsTab            = eval('document.getElementById("spec").style');
			accessariesTab      = eval('document.getElementById("accessorie").style');
			featureContents     = eval('document.getElementById("featurescon").style');
			spec1Contents       = eval('document.getElementById("speccon").style');
			accessariContents   = eval('document.getElementById("accessoriecon").style');

			featuresAHTab       = eval('document.getElementById("featuresAH").style');
			specsAHTab          = eval('document.getElementById("specAH").style');
			featureAHContents   = eval('document.getElementById("featuresAHcon").style');
			specAHContents      = eval('document.getElementById("specAHcon").style');
			
			featuresHSTab       = eval('document.getElementById("featuresHS").style');
			specsHSTab          = eval('document.getElementById("specHS").style');
			featureHSContents   = eval('document.getElementById("featuresHScon").style');
			specHSContents      = eval('document.getElementById("specHScon").style');

			featuresFTab       = eval('document.getElementById("featuresF").style');
			specsFTab          = eval('document.getElementById("specF").style');
			featureFContents   = eval('document.getElementById("featuresFcon").style');
			specFContents      = eval('document.getElementById("specFcon").style');

			if ( tabId == "features" ){
				featuresTab.display     = ""
				accessariesTab.display  = "none"
				specsTab.display        = "none"
				featureContents.display = ""
				accessariContents.display = "none"
				spec1Contents.display   = "none"
			} else if ( tabId == "spec" ){
				featuresTab.display     = "none"
				accessariesTab.display  = "none"
				specsTab.display        = ""
				featureContents.display = "none"
				accessariContents.display = "none"
				spec1Contents.display   = ""
			} else if ( tabId == "accessorie"){
				featuresTab.display     = "none"
				accessariesTab.display  = ""
				specsTab.display        = "none"
				featureContents.display = "none"
				accessariContents.display = ""
				spec1Contents.display   = "none"
			} else if ( tabId == "featuresAH"){
				featuresAHTab.display     = ""
				specsAHTab.display        = "none"
				featureAHContents.display = ""
				specAHContents.display    = "none"
			} else if ( tabId == "specAH"){
				featuresAHTab.display     = "none"
				specsAHTab.display        = ""
				featureAHContents.display = "none"
				specAHContents.display    = ""
			} else if ( tabId == "featuresHS"){
				featuresHSTab.display     = ""
				specsHSTab.display        = "none"
				featureHSContents.display = ""
				specHSContents.display    = "none"
			} else if ( tabId == "specHS"){
				featuresHSTab.display     = "none"
				specsHSTab.display        = ""
				featureHSContents.display = "none"
				specHSContents.display    = ""
			} else if ( tabId == "featuresF"){
				featuresFTab.display     = ""
				specsFTab.display        = "none"
				featureFContents.display = ""
				specFContents.display    = "none"
			} else if ( tabId == "specF"){
				featuresFTab.display     = "none"
				specsFTab.display        = ""
				featureFContents.display = "none"
				specFContents.display    = ""
			}

		}
	}

	// Attach File Download
	function filedown(filePath, fileName) {
		location.href="/filedown.jhtml?filepath="+filePath+"&fileName="+fileName;
	}

	// Paging
	function callPage(currPage) {
		var myform = eval("document.ProductForm");

		myform.currPage.value = currPage;
		myform.actType.value  = "list";
		myform.action         = currServlet + currUrl + currPage + ".jhtml";
		myform.method = "post";
		myform.submit();
	}

	function changeImg(src) {
		var obj = MM_findObj('Image15', document);

		obj.src = src;
	}