// JavaScript Document
function quickProduct(vprodid) {
	if (vprodid != "") {
		vprods = vprodid.split(":");
		if (vprods[0] != "0")
			window.location.href = "products_inside.php?pmid=" + vprods[0] + "&productid=" + vprods[1];
		else
			window.location.href = "products.php?pmid=" + vprods[1];
	}
	return;
}


function resizeImage() {
	//alert(parseInt(navigator.appVersion));
	if (parseInt(navigator.appVersion) == 4) {
		var imgobjs = document.getElementsByName("product_image");
		if (imgobjs.length > 0) {
			//alert(imgobjs.length);
			if (imgobjs.length > 1) {
				for (var i = 0; i < imgobjs.length; i++) {
					var vrate = 0;
					if (imgobjs[i].height > 120) {
						vrate = imgobjs[i].height / 120;
						var nwidth = parseInt(imgobjs[i].width / vrate);
						imgobjs[i].height = 120;
						imgobjs[i].width = nwidth;
						//imgobjs[i].alt = imgobjs[i].width + "," + nwidth + ", " + imgobjs[i].height;
						//alert(i +":" + rate);
						//alert(imgobjs[i].width + ", " + imgobjs[i].height);
					}
					
				}
			} else {
				if (imgobjs.height > 120) {
					var vrate = imgobjs.height / 120;
					var nwidth = parseInt(imgobjs.width / vrate);
					imgobjs.height = 120;
					imgobjs.width = nwidth;
					
				}			
			}
		}
		
	}
}

window.onload = resizeImage;



