// JavaScript Document for OxyCart


function bookmark(url,title){
  if ((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4)) {
  window.external.AddFavorite(url,title);
  } else if (navigator.appName == "Netscape") {
    window.sidebar.addPanel(title,url,"");
  } else {
    alert("Press CTRL-D (Netscape) or CTRL-T (Opera) to bookmark");
  }
}

function mailto(receipient)
{
// var domain = 'domainhere.com';
// document.location = 'mailto:' + receipient + '@' + domain;
 document.location = 'mailto:' + receipient;

}

function popImg(srcImg,w,h)
{
	PositionX = 100;
	PositionY = 100;
	defaultWidth  = 300;
	defaultHeight = 200;
	var AutoClose = false; // allow multiple popups
	var params='scrollbars=no,resizable=yes,width=400,height=300,left='+PositionX+',top='+PositionY;

	imgWin = window.open('about:blank','',params);
	with (imgWin.document)
	{ 	
		writeln('<html><head><title>Loading Image...</title><style>body{margin:0px;}</style>');
		writeln('<sc'+'ript>');
		writeln('function reSizeToImage(){');
		writeln('window.resizeTo(100,100);');
		
	
		if (navigator.userAgent.indexOf("Firefox/1.4")== 1)
		{
			writeln('width=100-(document.body.clientWidth-document.images[0].width);');
			writeln('height=100-(document.body.clientHeight-document.images[0].height);');
		}
		else
		{
			writeln('width=document.the_img.width+25;');
			writeln('height=document.the_img.height+65;');
		}
		
		
		writeln('window.resizeTo(width,height);');
		writeln('document.title="Viewing Fullsized Image";}');
		writeln('</sc'+'ript>');
		if (!AutoClose)
			writeln('</head><body bgcolor=000000 scroll="no" onLoad="reSizeToImage();self.focus()">');
		else 
			writeln('</head><body bgcolor=000000 scroll="no" onLoad="reSizeToImage();self.focus()" onBlur="self.close()">'); 
	
		writeln('<img id="the_img" name="the_img" src="'+srcImg+'" style="display:block"></body></html>');
		close();
	}
	

}	

 