// Setting Cookie Trying to solve the problem.. working on it.
function doclose(){
	var atime = new Date();
	var s = document.domain;
	btime = new Date(atime.valueOf() + 24*60*60*1000);
	s = s.substr(s.indexOf("."));
	document.cookie = "isnewwin=1; expires=" + btime.toGMTString() + "; path=/; domain=" + s + ";";
    self.close();
}

// Image Viewer
function image_view(img){
		// File and script initially written by Young Joon Kim 8/25/03
        var imgTmp = new Image();
        imgTmp.src = img;
		var imgWidth = imgTmp.width;
		var imgHeight = imgTmp.height; //+40;

        var imgWin = window.open("","ImgWin","width="+imgWidth+",height="+imgHeight+",status=no,toolbar=no,scrollbars=auto,resizable=1");
        imgWin.document.write("<html><title>Product Viewer</title>"
        +"<body topmargin=0 leftmargin=0 marginheight=0 marginwidth=0>"
        +"<a href='javascript:self.close()'><img src='"+img+"' width="+imgTmp.width+" height="+imgTmp.height+" border=0></a>"
        +"</body></html>");
}

