function CateLink(str, str2){
	var rStr = parseInt(str) * 10 + parseInt(str2);
	// alert("A:"+ str +"/B:"+str2);
	switch (rStr) {
		case 10 :	location.href = "/product/product_main.asp?code1=1";	break;
		case 11 :	location.href = "/product/product_list.asp?code1=1&code2=1";	break;
		case 12 :	location.href = "/product/product_list.asp?code1=1&code2=2";	break;
		case 13 :	location.href = "/product/product_list.asp?code1=1&code2=3";	break;
		case 14 :	location.href = "/product/product_list.asp?code1=1&code2=4";	break;
		case 15 :	location.href = "/product/product_list.asp?code1=1&code2=5";	break;
		case 16 :	location.href = "/product/product_list.asp?code1=1&code2=6";	break;
		case 17 :	location.href = "/product/product_list.asp?code1=1&code2=7";	break;

		case 20 :	location.href = "/product/product_main.asp?code1=2";	break;
		case 21 :	location.href = "/product/product_list.asp?code1=2&code2=1";	break;
		case 22 :	location.href = "/product/product_list.asp?code1=2&code2=2";	break;
		case 23 :	location.href = "/product/product_list.asp?code1=2&code2=3";	break;
		case 24 :	location.href = "/product/product_list.asp?code1=2&code2=4";	break;
		case 25 :	location.href = "/product/product_list.asp?code1=2&code2=5";	break;
		case 26 :	location.href = "/product/product_list.asp?code1=2&code2=6";	break;
		case 27 :	location.href = "/product/product_list.asp?code1=2&code2=7";	break;

		case 30 :	location.href = "/product/product_main.asp?code1=3";	break;
		case 31 :	location.href = "/product/product_list.asp?code1=3&code2=1";	break;
		case 32 :	location.href = "/product/product_list.asp?code1=3&code2=2";	break;
		case 33 :	location.href = "/product/product_list.asp?code1=3&code2=3";	break;
		case 34 :	location.href = "/product/product_list.asp?code1=3&code2=4";	break;
		case 35 :	location.href = "/product/product_list.asp?code1=3&code2=5";	break;
		case 36 :	location.href = "/product/product_list.asp?code1=3&code2=6";	break;

		case 40 :	location.href = "/product/product_main.asp?code1=4";	break;
		case 41 :	location.href = "/product/product_list.asp?code1=4&code2=1";	break;
		case 42 :	location.href = "/product/product_list.asp?code1=4&code2=2";	break;
		case 43 :	location.href = "/product/product_list.asp?code1=4&code2=3";	break;
		case 44 :	location.href = "/product/product_list.asp?code1=4&code2=4";	break;
		case 45 :	location.href = "/product/product_list.asp?code1=4&code2=5";	break;
		case 46 :	location.href = "/product/product_list.asp?code1=4&code2=6";	break;
		case 47 :	location.href = "/product/product_list.asp?code1=4&code2=7";	break;
		case 48 :	location.href = "/product/product_list.asp?code1=4&code2=8";	break;
		case 49 :	location.href = "/product/product_list.asp?code1=4&code2=9";	break;

		case 50 :	location.href = "/product/product_main.asp?code1=5";	break;
		case 51 :	location.href = "/product/product_list.asp?code1=5&code2=1";	break;
		case 52 :	location.href = "/product/product_list.asp?code1=5&code2=2";	break;
		case 53 :	location.href = "/product/product_list.asp?code1=5&code2=3";	break;

		case 60 :	location.href = "/product/product_main.asp?code1=6";	break;
		case 61 :	location.href = "/product/product_list.asp?code1=6&code2=1";	break;
		case 62 :	location.href = "/product/product_list.asp?code1=6&code2=2";	break;
		case 63 :	location.href = "/product/product_list.asp?code1=6&code2=3";	break;
		case 64 :	location.href = "/product/product_list.asp?code1=6&code2=4";	break;
		case 65 :	location.href = "/product/product_list.asp?code1=6&code2=5";	break;
		case 66 :	location.href = "/product/product_list.asp?code1=6&code2=6";	break;
	}
}

function LinkPage(str1){
	location.href = "/product/product_list.asp?code1="+str1;
}

function ProdLinkPage(str1, str2){
	location.href = "/product/product_list.asp?code1="+str1+"&code2="+str2;
}

function LinkProductView(pNo){
	location.href = "/product/product_detail.asp?product_num="+pNo;
}

function PopWin(url, w, h, sb) {
	var newWin;
	var setting = "width="+w+", height="+h+", top=5, left=20, scrollbars="+sb;
	newWin = window.open (url, "", setting);
	newWin.focus();
}

function ZoomImg(str){
	window.open("/product/zoom_image.asp?product_num="+str,"ZoomImg","width=650, height=680, top=50, left=50, scrollbars=no");
}

function adjustImageW(target_img, mmWid) {
	var newX, newY;
	var newHeight, newWidth;
	var newImg;
	var maxWidth = mmWid;

	newImg = new Image();
	newImg.src = target_img.src;
	imgw = newImg.width;
	imgh = newImg.height;

	if (imgw > maxWidth) {
		newWidth = maxWidth;

		target_img.onload = null;
		target_img.src = newImg.src;
		target_img.width = newWidth;
	} else {
		newWidth = imgw;
		newHeight = imgh;

		target_img.onload = null;
		target_img.src = newImg.src;
		target_img.width = newWidth;
		target_img.height = newHeight;
	}
}

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 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];}
}