function del(text)
	{return confirm("Are you sure you want"+text+"?");	} 

function WinOpener(line, name, wname) 
{
	if (WinOpener.arguments.length > 4) {
	  w = WinOpener.arguments[3];
	  h = WinOpener.arguments[4];
	} else {
		w = 617;
		h = 480;
	  }
	wname = window.open(line, name, "menubar=no,status=yes,toolbar=no,scrollbars=yes,resizable=no,width=" + w + ",height=" + h + ",left=" + Math.round(screen.width/2 - w/2) + ",top=" + Math.round(screen.height/2 - h/2 - 40));
}

function PrintOpener(line, name, wname) 
{
	wname = window.open(line, name, "menubar=no,status=yes,toolbar=no,resizable=yes,scrollbars=yes,width=308,height=240,left=" + Math.round(screen.width/2 - 154) + ",top=" + Math.round(screen.height/2 - 250));
}

function PhotoWindow(file,w,h)
{
	var win2;
	NLeft = Math.round(screen.width/2 - w/2);
	NTop = Math.round(screen.height/2 - h/2);
	win2 = window.open("/cgi-bin/image_preview.cgi?file=/upload/photo/large/"+file+"&width="+w+"&height="+h,"", "menubar=no,status=no,toolbar=no,resizable=no,scrollbars=no,width=" +w+ ",height=" +h+ ",left=" + NLeft + ",top=" + NTop);
	win2.focus();
}

function ProfOpener(id) {

	NLeft = Math.round(screen.width/2 - 320);
	NTop = Math.round(screen.height/2 - 280);
 	prname = window.open('/cgi-bin/pp_profile.cgi?id='+id, "prname_" + id, "menubar=no,status=yes,toolbar=no,scrollbars=yes,resizable=no,width=617,height=480,left=" + NLeft + ",top=" + NTop);
	prname.focus();
}

function ProfOpenerS(line) {

	NLeft = Math.round(screen.width/2 - 320);
	NTop = Math.round(screen.height/2 - 280);

 	prname = window.open('/cgi-bin/pp_profile.cgi?screenname='+line, "prname_" + line.replace(/%/gi,'') , "menubar=no,status=yes,toolbar=no,scrollbars=yes,resizable=no,width=617,height=480,left=" + NLeft + ",top=" + NTop);
	prname.focus();
}
function NAProfOpener(id) {

	NLeft = Math.round(screen.width/2 - 320);
	NTop = Math.round(screen.height/2 - 280);
 	prname = window.open('/cgi-bin/na_profile.cgi?id='+id, "prname_" + id, "menubar=no,status=yes,toolbar=no,scrollbars=yes,resizable=no,width=617,height=480,left=" + NLeft + ",top=" + NTop);
	prname.focus();
}

function NAProfOpenerS(line) {

	NLeft = Math.round(screen.width/2 - 320);
	NTop = Math.round(screen.height/2 - 280);

 	prname = window.open('/cgi-bin/na_profile.cgi?screenname='+line, "prname_" + line.replace(/%/gi,'') , "menubar=no,status=yes,toolbar=no,scrollbars=yes,resizable=no,width=617,height=480,left=" + NLeft + ",top=" + NTop);
	prname.focus();
}

function enableButton(form_name,button_name,type) {
  document.forms[form_name][button_name].className = type;
  document.forms[form_name][button_name].disabled = false;
}
function disableButton(form_name,button_name,type) {
  document.forms[form_name][button_name].className = type;
  document.forms[form_name][button_name].disabled = true;
}

function friend()
{
	WinOpener('/cgi-bin/templates/common/popup/pp_tellafriend.php', 'Friend', 'friend');
}

function res(width){
	w_c=document.body.clientWidth
	w_s=document.body.scrollWidth;
	w=(w_c>w_s)?w_c:w_s;
	w_l=0;//document.body.scrollLeft;
	w_img=width;
        l_div=w/2-w_img/2-15 - w_l/2;
	document.getElementById('div').style.left=l_div;
	//document.getElementById('div').style.top=t_div;
//	window.status=w_c+'   '+ w_s + '    ' +w_l+ '   '+l_div;

}
											



