// JavaScript Document
function confirmSubmit($msg) {
	
	var agree=confirm($msg);
		
	if (agree)
		return true;
	else
		return false;
}

function confirmStop($msg, sURL) {
	
	var agree=confirm($msg);
		
	if (agree)	{
		Close(sURL);
		return true;
	}else {
		return false;
	}
}

function checkCond($msg)
{
		if(reg_form.condition.checked)
		{ 
			return true;	
		}
		else
		{
			alert($msg);
			return false;
		}	
}

function popupinfo(url, h, w) 
{
	newwindow=window.open(url,'information','height='+h+',width='+w);
	if (window.focus) {newwindow.focus()}
}

function help(key) {
	
	if(key == 'count_pending') h = '210';
	else h = '150';
	w = '300';
	var winl = (screen.width-w)/2;
	var wint = (screen.height-h)/2;
	newwindow=window.open('popup-help.php?'+key,'information','scrollbars=0,statusbar=0,menubar=0,resizable=0,height='+h+',width='+w+',left='+winl+',top='+wint);
	if (window.focus) {newwindow.focus()}
	//newwindow.moveTo(winl,wint); 
}

function Close(sURL)
{
	opener.focus();
	opener.location.replace(sURL);
	self.close();
}
	
function selfResize(w, h) 
{
	this.resizeTo(w, h);
	//this.moveTo(0,0);
}

function Alrt(alrt)
{
	alert(alrt);
}

function Cnfrm(alrt)
{
	if(confirm(alrt))
	{
		window.location.href="?page=home_end";
	}
	else
	{
		alert('cancel');
	}
}

function mmLoadMenus() {
  if (window.mm_menu_0408125451_0) return;
  
  window.mm_menu_0408125451_0 = new Menu("root",132,17,"",11,"#000000","#FFFFFF","#E1E1E1","#383838","left","middle",3,1,100,-5,7,true,false,true,0,false,true);
  mm_menu_0408125451_0.addMenuItem("Who we are","location='?page=who'");
  mm_menu_0408125451_0.addMenuItem("Policy","location='?page=policy'");
  mm_menu_0408125451_0.addMenuItem("Contact Us","location='?page=contact'");
  mm_menu_0408125451_0.addMenuItem("Reports","location='?page=reports'");
   mm_menu_0408125451_0.fontWeight="bold";
   mm_menu_0408125451_0.hideOnMouseOut=true;
   mm_menu_0408125451_0.bgColor='#555555';
   mm_menu_0408125451_0.menuBorder=1;
   mm_menu_0408125451_0.menuLiteBgColor='';
   mm_menu_0408125451_0.menuBorderBgColor='#FFFFFF';
   
   window.admin_menu = new 			Menu("root",122,17,"",11,"#000000","#FFFFFF","#E1E1E1","#383838","left","middle",3,1,100,-5,7,true,false,true,0,false,true);
  admin_menu.addMenuItem("Who we are","location='?page=adm_page&p=who'");
  admin_menu.addMenuItem("Policy","location='?page=adm_page&p=policy'");
  admin_menu.addMenuItem("Contact Us","location='?page=contact'");
  admin_menu.addMenuItem("Reports","location='?page=reports'");
   admin_menu.fontWeight="bold";
   admin_menu.hideOnMouseOut=true;
   admin_menu.bgColor='#555555';
   admin_menu.menuBorder=1;
   admin_menu.menuLiteBgColor='';
   admin_menu.menuBorderBgColor='#FFFFFF';

	mm_menu_0408125451_0.writeMenus();
}

function toggleLayer( whichLayer )
{  
    var elem, vis;  
    
    if( document.getElementById ) // this is the way the standards work    
    {
        elem = document.getElementById(whichLayer);
    }
    else if( document.all ) // this is the way old msie versions work
    {      
        elem = document.all[whichLayer]; 
    }
    else if( document.layers ) // this is the way nn4 works    
    {
        elem = document.layers[whichLayer];
    }
        
    vis = elem.style;  
    
    // if the style.display value is blank we try to figure it out here 
    if(vis.display==''&&elem.offsetWidth!=undefined&&elem.offsetHeight!=undefined)    
        vis.display = (elem.offsetWidth!=0&&elem.offsetHeight!=0)?'block':'none';  

    vis.display = (vis.display==''||vis.display=='block')?'none':'block';
}