﻿// JScript File

MidX=screen.availWidth/2
MidY=screen.availHeight/2

function popup(url,w,h)
 {
    var nWin = window.open(url,'popup','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,top='+MidX/2+',left='+MidY/2+',resizable=no,width='+w+',height='+h);
    nWin.focus();
 }

function mapPopup(url,w,h)
 {
    var nWin = window.open(url,'popup','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,top='+MidX/2+',resizable=yes,width='+w+',height='+h);
    nWin.focus();
 }
 
function NavOver(val,imagename)
{
    document.getElementById(val).src=imagename;
}

function NavOut(val,imagename)
{
   document.getElementById(val).src=imagename;
}

function showDiv(val)
{
    if(document.getElementById(val).style.display == 'none')
    {
        document.getElementById(val).style.display = 'block';
    }
}

function hideDiv(val)
{
   if(document.getElementById(val).style.display == 'block')
    {
        document.getElementById(val).style.display = 'none';
    }
}


function emptyData(val,val2)
{
   if(document.getElementById(val).value == val2)
   {
        document.getElementById(val).value = '';
   }
}

function fillData(val,val2)
{
   if(document.getElementById(val).value == '')
   {
        document.getElementById(val).value = val2;
   }
}

 function ConfirmPrint() {
	var answer = confirm("Are you sure you want to print this page?")
	if (answer){
		window.print();
		window.close();
	}
	else
	window.close();
}


function BrowserCheck()
{
 
    var agt=navigator.userAgent.toLowerCase();
	var is_mac = (agt.indexOf("mac")!=-1);
	var MidX=screen.availWidth/2;
	
	if(is_mac)
	{
	    if(agt.indexOf("safari/419.3") != -1)
        {
        }
		else if(agt.indexOf("mozilla/5.0") != -1)
		{		    
           
        }
       
        else if(agt.indexOf("opera/9.10") != -1)
        {
           
        }
		else
		{
            
        }
	}
	else
	{
		if(agt.indexOf("mozilla/5.0") != -1)
		{
		    
		} 
		else if(agt.indexOf("opera/9.10") != -1)
        {
           document.getElementById('subTable').height = '100%';
           document.getElementById('mainTable').height = '100%';
        }
		else
		{
		    document.getElementById('content').style.width = "100%";
		}
	}	
		
}