// JavaScript Document

function openpopwps(pop, size)
{
	if (size == "video")
	{
		window.open(pop,"","width=320,height=278,");
	}
	else if (size == "medium")
	{
		window.open(pop,"","width=410,height=285,");
	}
	else if (size == "large")
	{
		window.open(pop,"","width=500,height=400,scrollbars=1,menubar=0,status=0,toolbar=0,location=0,resizable=1,");
	}
	
}

function popSite(site){
			var mainWin = window.open(site,'mainWin','width=320,height=278,scrollbars=0,menubar=0,status=0,toolbar=0,location=0,resizable=0,screenX=0,screenY=0,left=50,top=50');
			mainWin.focus();
		}
		
function pop360x240(site){
			var mainWin = window.open(site,'mainWin','width=360,height=278,scrollbars=0,menubar=0,status=0,toolbar=0,location=0,resizable=0,screenX=0,screenY=0,left=50,top=50');
			mainWin.focus();
		}

function pop640x480(site){
			var mainWin = window.open(site,'mainWin','width=640,height=520,scrollbars=0,menubar=0,status=0,toolbar=0,location=0,resizable=0,screenX=0,screenY=0,left=50,top=50');
			mainWin.focus();
		}
		
		function pop480x360(site){
			var mainWin = window.open(site,'mainWin','width=480,height=400,scrollbars=0,menubar=0,status=0,toolbar=0,location=0,resizable=0,screenX=0,screenY=0,left=50,top=50');
			mainWin.focus();
		}
		
function popCrimeStat(site){
			var mainWin = window.open(site,'mainWin','width=630,height=700,scrollbars=1,menubar=1,status=0,toolbar=0,location=0,resizable=1,screenX=0,screenY=0,left=50,top=50');
			mainWin.focus();
		}
		
function LoadOnceWPS(pop, size)
{
	if (GetCookie("poppedup")=="notfound")
	{
		openpopwps(pop, size)
		document.cookie="poppedup";
	}
}

function GetCookie(cookieName) 
{
	var returnValue = "notfound";
  
	if (document.cookie.length > 0) 
	{
		offset = document.cookie.indexOf(cookieName);
		if (offset != -1) 
		{ 
			returnValue="found";
		}
	}
	return returnValue;
}

function doClock() {
    var t = new Date(), a = doClock.arguments, str = "", i, a1;
    var month = new Array("January", "Jan", "February", "Feb", "March", "Mar", "April", "Apr", "May", "May", "June", "Jun", "July", "Jul", "August", "Aug", "September", "Sep", "October", "Oct", "November", "Nov", "December", "Dec");
    var tday = new Array("Sunday", "Sun", "Monday", "Mon", "Tuesday", "Tue", "Wednesday", "Wed", "Thursday", "Thr", "Friday", "Fri", "Saturday", "Sat");
    for (i = 0; i < a.length; i++) {
        a1 = a[i].charAt(1);
        switch (a[i].charAt(0)) {
          case "M":
            str += (a1 == "2") ? t.getMonth() + 1 : month[t.getMonth() * 2 + Number(a1)];
            break;
          case "D":
            str += t.getDate();
            break;
          case "Y":
            str += (a1 == "0") ? t.getFullYear() : t.getFullYear().toString().substring(2);
            break;
          case "W":
            str += tday[t.getDay() * 2 + Number(a1)];
            break;
          default:
            str += unescape(a[i]);
        }
    }
    return str;
}


//<SCRIPT LANGUAGE="Javascript"><!--
// ***********************************************
// AUTHOR: WWW.CGISCRIPT.NET, LLC
// URL: http://www.cgiscript.net
// Use the script, just leave this message intact.
// Download your FREE CGI/Perl Scripts today!
// ( http://www.cgiscript.net/scripts.htm )
// ***********************************************
var isNS = (navigator.appName == "Netscape") ? 1 : 0;
var EnableRightClick = 0;
if(isNS)
document.captureEvents(Event.MOUSEDOWN||Event.MOUSEUP);
function mischandler(){
if(EnableRightClick==1){ return true; }
else {return false; }
}
function mousehandler(e){
if(EnableRightClick==1){ return true; }
var myevent = (isNS) ? e : event;
var eventbutton = (isNS) ? myevent.which : myevent.button;
if((eventbutton==2)||(eventbutton==3)) return false;
}
function keyhandler(e) {
var myevent = (isNS) ? e : window.event;
if (myevent.keyCode==96)
EnableRightClick = 1;
return;
}
document.oncontextmenu = mischandler;
document.onkeypress = keyhandler;
document.onmousedown = mousehandler;
document.onmouseup = mousehandler;
////-->
//<script>

function ASHLEYOpenInNewWindow(Url){
	newwindow=window.open(Url,'name','width=625,height=435,toolbar=yes,location=yes,directories=no,menubar=yes,resizable=yes,scrollbars=yes');
	if (window.focus) {newwindow.focus()};
}

function popitup(url) {
	newwindow=window.open(url,'name','height=200,width=150');
	if (window.focus) {newwindow.focus()}
	return false;
}




