//window.name = location.href;
//document.writeln(window.name);
//var whereto = "../";
var browser = "";
if (navigator.userAgent.indexOf("Win") != -1) {
	if (navigator.userAgent.indexOf("MSIE") != -1) {
		browser = "iewin";
	} else {
		browser = "netwin";
	}
} else {
	if (navigator.userAgent.indexOf("MSIE") != -1) {
		browser = "iemac";
	} else {
		browser = "netmac";
	}
}
//home = "so, here's a number " + this.location.href.lastIndexOf("\");
//document.writeln(home.valueOf());
//if (home.valueOf() > "0") { whereto = ""; }
// why did css break? jt 
document.write("<LINK REL=\"stylesheet\" TYPE=\"text/css\" HREF=\"../styles/glow" + browser + ".css\">");

// daku's original function:
function ChildWinWithMessage(url,name,x,y,message) {
	this.url = url;
	this.name = name;
	this.x = x;
	this.y = y;
	this.message = message;
	var winhandle;

	winhandle = window.open(url,name,"width="+x+",height="+y);
	//ASIA - this is just example of how to do something with the child window
	//"winhandle" dot "document" dot "blah()" where blah is a method.
	winhandle.document.open();
	winhandle.document.writeln(message);
	winhandle.document.close();
}

// asia's combo of old and new:
function getPopWindow(url, name, x, y) {
        winstats = "toolbar=no,location=no,directories=no,menubar=no,resizeable=no,scrollbars=no,status=yes,";
   	if ((browser == "iewin") || (browser == "netwin")) {
      	winstats += "left=200,top=50,width=" + x + ",height=" + y;
	}else{
	winstats += "screenX=200, screenY=50, width=" + x + ", height=" + y;
	}
	
	//this.url = url;
	//this.name = name;
	//this.x = x;
	//this.y = y;
	//this.message = message;
	var winhandle;
	//alert(winstats);
	window.open(url,name,winstats);
	//winhandle = window.open(url, name, winstats);
}

function getBigView(prod_id) {
   winstats='toolbar=no,location=no,directories=no,menubar=no,resizeable=yes'
   winstats+='scrollbars=yes'
   if (navigator.appName.indexOf("Microsoft")>=0) {
      winstats+=',left=200,top=50,width=470,height=515'
	  }else{
      winstats+=',screenX=200,screenY=50,width=470,height=515'
	  }
   // larger_view.html will need to be larger_view.php?group_id=xxx 
   NewName=window.open('larger_view.php?pid=prod_id','Gift',winstats,'');
}

function getAboutIG() 
{
   winstats='toolbar=no,location=no,directories=no,menubar=no,resizeable=yes'
   winstats+='scrollbars=yes'
   if (navigator.appName.indexOf("Microsoft")>=0) 
   {
      winstats+=',left=200,top=50,width=400,height=400'
	  }else{
      winstats+=',screenX=200,screenY=50,width=400,height=400'
	  }
   NewName=window.open('about_InstantGifts.html','Gift',winstats,'');
}
