/* start window popup 1 defining w/h within html */

/****************************************************
Author: Eric King
Url: http://redrival.com/eak/index.shtml
****************************************************/
var win=null;
function NewWindow(mypage,myname,w,h,scroll,pos){
if(pos=="random"){LeftPosition=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;TopPosition=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;}
if(pos=="center"){LeftPosition=(screen.width)?(screen.width-w)/2:100;TopPosition=(screen.height)?(screen.height-h)/2:100;}
else if((pos!="center" && pos!="random") || pos==null){LeftPosition=0;TopPosition=20}
settings='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no';
win=window.open(mypage,myname,settings);}

/* To Use this:
LINK:
<a href="page.htm" onclick="NewWindow(this.href,'main','800','450','no','center');return false" onfocus="this.blur()">LINK</a>
*/

/* end window popup 1 defining w/h within html */



/* start window popup 2 defining w/h within js */

function NewWindowDG(mypage,myname)
{
	var w = 620;
	var h = 730;
	var scroll = "yes";
	var pos = "center";

	if(pos=="random"){
		LeftPosition=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;
		TopPosition=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;
	}
	if(pos=="center") {
		LeftPosition=(screen.width)?(screen.width-w)/2:100;
		TopPosition=(screen.height)?(screen.height-h)/2:100;
	}
	else if((pos!="center" && pos!="random") || pos==null) { 
		LeftPosition=0;
		TopPosition=20;
	}
	settings='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',location=yes,status=no,menubar=yes,toolbar=no,resizable=no';
	win=window.open(mypage,myname,settings);
}

/* end window popup 2 defining w/h within js */



/* start window popup for 2-D line art */

var win=null;
function NewWindow2D(mypage,myname,w,h,scroll,pos){
if(pos=="random"){LeftPosition=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;TopPosition=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;}
if(pos=="center"){LeftPosition=(screen.width)?(screen.width-w)/2:100;TopPosition=(screen.height)?(screen.height-h)/2:100;}
else if((pos!="center" && pos!="random") || pos==null){LeftPosition=0;TopPosition=20}
settings='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',location=no,directories=no,status=no,menubar=yes,toolbar=no,resizable=yes';
win=window.open(mypage,myname,settings);}

/* To Use this:
LINK:
<a href="page.htm" onclick="NewWindow(this.href,'main','800','450','no','center');return false" onfocus="this.blur()">LINK</a>
*/

/* end window popup for 2-D line art */


/* start window popup for products database */

function NewWindowPR(mypage,myname)
{
	var w = 375;
	var h = 250;
	var scroll = "no";
	var pos = "center";

	if(pos=="random"){
		LeftPosition=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;
		TopPosition=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;
	}
	if(pos=="center") {
		LeftPosition=(screen.width)?(screen.width-w)/2:100;
		TopPosition=(screen.height)?(screen.height-h)/2:100;
	}
	else if((pos!="center" && pos!="random") || pos==null) { 
		LeftPosition=0;
		TopPosition=20;
	}
	settings='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',location=no,directories=no,status=no,menubar=yes,toolbar=no,resizable=no';
	win=window.open(mypage,myname,settings);
}

function NewWindowProfile(mypage,myname)
{
	var w = 740;
	var h = 480;
	var scroll = "no";
	var pos = "center";

	LeftPosition=(screen.width)?(screen.width-w)/2:100;
	TopPosition=(screen.height)?(screen.height-h)/2:100;

	settings='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',location=no,directories=no,status=no,menubar=yes,toolbar=no,resizable=no';
	win=window.open(mypage,myname,settings);
}

/* end window popup for products database */
