
//	already have: script language=javascript



//	Global Javascript stuff

window.defaultStatus="RH";

function swapImages() 
{
//alert(document[swapImages.arguments[0]].src);
	document[swapImages.arguments[0]].src = eval(swapImages.arguments[1] + ".src");
}

function changeImages() 
{
	var vjIs_OK = 1;
	if (navigator.appName == "Microsoft Internet Explorer")
	{
		var arVersion = navigator.appVersion.split("MSIE")
		var version = parseFloat(arVersion[1])
		if (version < 7)
		{
			vjIs_OK = 0;
		}
	}

	if (vjIs_OK == 1)
	{
		document[changeImages.arguments[0]].src = eval(changeImages.arguments[1] + ".src");
	}
}

function newImage(arg) 
{
	if (document.images) 
	{
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}



function openAndCenterWindow(urlToOpenInNewWindow,w,h)
{

	var vjNeedToOpenNewWindow=1;  //default: open new window
	
	// Does the window exist, or has it previously been opened?
	if(window.vjPopupWindow)
	{
		// Having once been opened, is it now closed?
		if(vjPopupWindow.closed)
		{
			vjNeedToOpenNewWindow=1   // closed, so open again
		}
		else
		{
			vjNeedToOpenNewWindow=0   // still open so set focus instead of open again
		}
	}
	
	else
	{
		vjNeedToOpenNewWindow=1   // never opened, so open new
	}
	
	
	if(vjNeedToOpenNewWindow == 0)
	{
		vjPopupWindow.focus()
	}
	else
	{

	var myScreenWidth = screen.width;
	var myScreenHeight= screen.height;
	
	var puWindowWidth	= w;	// (6*myScreenWidth)/8;
	var puWindowHeight	= h;	// (8*myScreenHeight)/10;

	var puLeft	= (myScreenWidth - w)/2;	// myScreenWidth/8;
	var puTop	= (myScreenHeight - h)/2;	// myScreenHeight/10;
		
	vjPopupWindow = window.open(urlToOpenInNewWindow,"myPopUpWindow", "width=" + puWindowWidth + ",height=" + puWindowHeight + " screenX=" + puLeft + ",left=" + puLeft	+ ",screenY=" + puTop + ",top=" + puTop + ",scrollbars=No,resizable=Yes")

	
	}
}



	
function openAndCenterWindow_WithToolbars(urlToOpenInNewWindow,w,h)
{

	var vjNeedToOpenNewWindow=1;  //default: open new window
	
	// Does the window exist, or has it previously been opened?
	if(window.vjPopupWindow)
	{
		// Having once been opened, is it now closed?
		if(vjPopupWindow.closed)
		{
			vjNeedToOpenNewWindow=1   // closed, so open again
		}
		else
		{
			vjNeedToOpenNewWindow=0   // still open so set focus instead of open again
		}
	}
	
	else
	{
		vjNeedToOpenNewWindow=1   // never opened, so open new
	}
	
	
	if(vjNeedToOpenNewWindow == 0)
	{
		vjPopupWindow.focus()
	}
	else
	{

	var myScreenWidth = screen.width;
	var myScreenHeight= screen.height;
	
	var puWindowWidth	= (6*myScreenWidth)/8;
	var puWindowHeight	= (8*myScreenHeight)/10;

	var puLeft	= myScreenWidth/8;
	var puTop	= myScreenHeight/10;
		
	vjPopupWindow = window.open(urlToOpenInNewWindow,"myPopUpWindow", "width=" + puWindowWidth + ",height=" + puWindowHeight + " screenX=" + puLeft + ",left=" + puLeft	+ ",screenY=" + puTop + ",top=" + puTop + ",scrollbars=Yes,menubar=Yes,resizable=Yes")
	
	}
}

function isValidEmailAddress(str)
{
	// check if gEmail has _@_._ format
	var i = str.indexOf('@');
	var j = str.lastIndexOf('.');
	//	alert(i + " " + j)
	if (j > i && ((j != -1) && (i != -1)))
	{
		return true;
	}
	else
	{
		return false;
	}
}

var timerID = null;
var timerRunning = false;

var timerID_PYOG = null;
var timerRunning_PYOG = false;
////////////////////////////////////////////////////////////////////////////////

function stopclock_PYOG ()
{
        if(timerRunning_PYOG)
                clearTimeout(timerID_PYOG);
        timerRunning_PYOG = false;
}

function startclock_PYOG () 
{
        stopclock_PYOG();
        showtime_PYOG();
}

function showtime_PYOG () {
  var months = new Array(13);
   months[0]  = "January";
   months[1]  = "February";
   months[2]  = "March";
   months[3]  = "April";
   months[4]  = "May";
   months[5]  = "June";
   months[6]  = "July";
   months[7]  = "August";
   months[8]  = "September";
   months[9]  = "October";
   months[10] = "November";
   months[11] = "December";

var myDays= ["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"]
 

        var now = new Date();
        var hours = now.getHours();
        var minutes = now.getMinutes();
        var seconds = now.getSeconds()
        
        var m=now.getMonth();
        var monthname   = months[m];

        var d=now.getDay();
        var dName = myDays[d];
        
        var monthNumber = now.getDate();
        
        var y=now.getFullYear();
        var timeValue = "" + ((hours >12) ? hours -12 :hours)
        timeValue += ((minutes < 10) ? ":0" : ":") + minutes
        timeValue += ((seconds < 10) ? ":0" : ":") + seconds
        timeValue += (hours >= 12) ? " pm" : " am"
        
        timeValue = dName + ", " + monthname + " " + monthNumber + ", " + y + "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" + timeValue;
        timeValue = timeValue + "&nbsp;&nbsp;&nbsp;";
       document.getElementById("ShowLiveClock").innerHTML = timeValue;
        timerID_PYOG = setTimeout("showtime_PYOG()",1000);
        timerRunning_PYOG = true;
}

////////////////////////////////////////////////////////////////////////////////

function stopclock ()
{
        if(timerRunning)
                clearTimeout(timerID);
        timerRunning = false;
}

function startclock () 
{
        stopclock();
        showtime();
}

function showtime () {
  var months = new Array(13);
   months[0]  = "January";
   months[1]  = "February";
   months[2]  = "March";
   months[3]  = "April";
   months[4]  = "May";
   months[5]  = "June";
   months[6]  = "July";
   months[7]  = "August";
   months[8]  = "September";
   months[9]  = "October";
   months[10] = "November";
   months[11] = "December";

var myDays= ["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"]
 

        var now = new Date();
        var hours = now.getHours();
        var minutes = now.getMinutes();
        var seconds = now.getSeconds()
        
        var m=now.getMonth();
        var monthname   = months[m];

        var d=now.getDay();
        var dName = myDays[d];
        
        var monthNumber = now.getDate();
        
        var y=now.getFullYear();
        var timeValue = "" + ((hours >12) ? hours -12 :hours)
        timeValue += ((minutes < 10) ? ":0" : ":") + minutes
        timeValue += ((seconds < 10) ? ":0" : ":") + seconds
        timeValue += (hours >= 12) ? " pm" : " am"
        
        timeValue = dName + ", " + monthname + " " + monthNumber + ", " + y + "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" + timeValue;
        timeValue = "612.455.2360&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" + timeValue;
       document.getElementById("ShowLiveClock").innerHTML = timeValue;
        timerID = setTimeout("showtime()",1000);
        timerRunning = true;
}

 
//change the opacity for different browsers 
function changeOpac(opc, id) 
{ 
    //window.status="opc-id: " + opc + " : " + id;
	var object = document.getElementById(id).style; 
	object.opacity = (opc / 100); 
	object.MozOpacity = (opc / 100); 
	object.KhtmlOpacity = (opc / 100); 
	object.filter = "alpha(opacity=" + opc + ")"; 
}
	
	
/*
var loadingImage = false;
function LoadImage(imageName,imageFile)
{
  if ((!document.images) || loadingImage) return;
  loadingImage = true;
  if (document.images[imageName].src.indexOf(imageFile)<0)
  {
    document.images[imageName].src = imageFile;
  }
  loadingImage = false;
}
LoadImage('image0','FlatEarth_25.jpg');
LoadImage('image1','FlatEarth_26.jpg');
LoadImage('image2','FlatEarth_33.jpg');
LoadImage('image3','FlatEarth_34.jpg');

LoadImage('image4','jfk_51.jpg');
LoadImage('image5','jfk_52.jpg');
LoadImage('image6','jfk_66.jpg');
LoadImage('image7','jfk_67.jpg');
LoadImage('image8','jfk_75.jpg');
LoadImage('image9','jfk_76.jpg');
LoadImage('image10','jfk_77.jpg');
LoadImage('image11','jfk_79.jpg');
LoadImage('image12','jfk_82.jpg');

LoadImage('image13','marvin_87.jpg');
LoadImage('image14','marvin_88.jpg');
LoadImage('image15','marvin_92.jpg');
LoadImage('image16','marvin_93.jpg');

LoadImage('image17','DeptOfHealth_98.jpg');
LoadImage('image18','DeptOfHealth_99.jpg');
LoadImage('image19','DeptOfHealth_100.jpg');

LoadImage('image20','DeptOfHealth_101.jpg');
LoadImage('image21','DeptOfHealth_104.jpg');
LoadImage('image22','DeptOfHealth_105.jpg');
LoadImage('image23','DeptOfHealth_109.jpg');
LoadImage('image24','DeptOfHealth_110.jpg');
LoadImage('image25','DeptOfHealth_114.jpg');
LoadImage('image26','DeptOfHealth_115.jpg');

LoadImage('image27','DeptOfHealth_101.jpg');
LoadImage('image28','DeptOfHealth_104.jpg');
LoadImage('image29','DeptOfHealth_105.jpg');
LoadImage('image30','DeptOfHealth_109.jpg');
LoadImage('image31','DeptOfHealth_110.jpg');
LoadImage('image32','DeptOfHealth_114.jpg');
LoadImage('image33','DeptOfHealth_115.jpg');
LoadImage('image34','DeptOfHealth_101.jpg');
LoadImage('image35','DeptOfHealth_104.jpg');
LoadImage('image36','DeptOfHealth_105.jpg');
LoadImage('image37','DeptOfHealth_109.jpg');
LoadImage('image38','DeptOfHealth_110.jpg');
LoadImage('image39','DeptOfHealth_114.jpg');
LoadImage('image40','DeptOfHealth_115.jpg');


*/




//already have: </script>