/*
	// $RCSfile: template.js,v $
	// $Source: /cvs/cyp-hotcoukweb-live/includes/template.js,v $, $Revision: 1.2 $, $Date: 2006/10/31 18:32:54 $, $State: Exp $ 
*/

function PopupPic(sPicURL) {
 window.open( ""+sPicURL, "",  "scrollbar=no,menubar=no,resizable=1,WIDTH=640,HEIGHT=480");
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

var win= null; 
function newwindow(mypage,myname,w,h,scroll){ 
	var winl = 0;
	var wint = 0;
	winl = (screen.width-w)/2;
	if (navigator.userAgent.indexOf("Opera")==-1){  //Opera needs to be zero as it keeps popups within the browser content area
		wint = (screen.height-h)/2;
	}
	settings='height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',toolbar=no,location=no,status=no,menubar=no,resizable=yes,dependent=no' 
	win=window.open(mypage,myname,settings) 
	if(parseInt(navigator.appVersion) >= 4){
		win.window.focus();
	}
} 

/* ENDS */