pup = new Object();
window.name="earthkeepersNetMain";
function showPhoto(imgSrc,imgTitle){
var pupBody=''
+'<html>'
+'<head>'
+'<title>'+imgTitle+'</title>'
+'<link href="/earthStyle.css" rel="stylesheet" type="text/css">'
+'</head>'
+'<body BGCOLOR="#DCD9B6" background="/images/background2.jpg" >'
+'<table width="460" border="0" cellpadding="4" cellspacing="4" bordercolor="#6C5442" bgcolor="#6C5442">'
+  '<tr>'
+    '<td width="444" align="center" valign="middle"><img src= '+imgSrc+'></td>'
+  '</tr>'
+'</table>'
+'</body>'
+'</html>';

showPup(pupBody,'photoPup',100,100,500,500);
}


function showProducts(pcatName){
	showPup(pup[pcatName],'showProductsPup',200,200,500,250);
}

showPupWindows= new Object();
showPupPrevArgs=new Array();
function showPup(pupBody,pupName,x1,y1,w,h){
	showPupPrevArgs=[pupBody,pupName,x1,y1,w,h];
	
	settings='width='+w+',height='+h+',top='+y1+',left='+x1+',scrollbars=yes,location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=yes';
	if(showPupWindows[pupName] && !showPupWindows[pupName].closed){
		win=showPupWindows[pupName];
		//showPupWindows[pupName].close();
		//setTimeout('showPup(showPupPrevArgs[0],showPupPrevArgs[1],showPupPrevArgs[2],showPupPrevArgs[3],showPupPrevArgs[4],showPupPrevArgs[5])',200)
	}else{
		win=window.open("/images/blank.gif",pupName,settings);
	}
	win.document.open();
	win.document.write(pupBody);
	win.document.close();
	win.focus();
	showPupWindows[pupName] = win;
	//}
}
//#################################
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
		}
	

/*<a href="test.html" onclick="NewWindow(this.href,'shoppingCart','700','500','no','center');return false" onfocus="this.blur()">YourLinkText</a>*/
}
