var wid=(screen.width>=1024)?118:95;
var MyString='';
if(typeof(BaseDir)=='undefined')
	BaseDir='';
BaseDir+='';
// \/ buttons
MyString+='<style type=text/css>body{margin:0 0 0 0;}.topmenu{border: 2 ridge #ffffff;height:20px;font-family:verdana,tahoma,arial;	color: white;'
	+'font-weight:700;font-size: 12;background-color: #29568e;padding: 2 2 2 2;margin 2 2 2 2;width:' + wid + ';'
	+'text-align: center;	cursor: default;}'
	+'.topmenuover{	border: 2 ridge #cecece;	height:20px;	font-family:verdana,tahoma,arial;	color: #29568e;'
	+'font-weight:700;	font-size: 12;	background-color: #fefefe;	padding: 2 2 2 2;	margin 2 2 2 2;'
	+'width: ' + wid + ';	text-align: center;	cursor: hand;}';
MyString+='A.footer{font-family: verdana,tahoma,arial; font-weight: normal; font-size: 8pt; color: "#255184"; text-decoration:none}'
	+'A.footer:hover{text-decoration: underline; color:red;}'

MyString+='.top{	font-family: verdana,tahoma,arial,verdana;	font-weight: bold;'
	+'	color: white;	font-size: 8pt;}</style>';


function ChangeOver(num)
{
	for(i=1;i<10;i++)
	{
		if(document.getElementById('Span' + i))
		document.getElementById('Span' + i).className=(i==num)?"topmenuover":"topmenu";
	}
}

function ChangeOut(num)
{
	for(i=1;i<10;i++)
	{
		if(document.getElementById('Span' + i))
		document.getElementById('Span' + i).className="topmenu";
	}
}

function GotoUrl(url)
{
	self.location=BaseDir + url;
}
var imgNum=0;
var totImg=5;

function ChangeImage()
{

	imagenum=imgNum;
	while(imagenum==imgNum)
	{
		imagenum=Math.floor(Math.random()*totImg);				
		imagenum=(imagenum>=totImg)?imagenum%totImg:imagenum;
	}
	//document.getElementById('ImageChanger').src=BaseDir  + 'images/Image' + imagenum +'.gif';
	//imagenum==imgNum;
	//setTimeout('ChangeImage()',4000);
	
}
var dat=new Date();
var strDat= dat.toLocaleString();
var comma=strDat.lastIndexOf(",");
strDat=strDat.substring(0,comma);

MyString+='<table border="0" width="100%" cellspacing="0" cellpadding="0">'
	+'<tr><td height=3 bgcolor="#cecece" colspan=2></td></tr>'
//	+'<tr><td bgcolor="#29568E" class="top">EXPERIMENTAL PROGRAM TO STIMULATE COMPETITIVE RESEARCH</td>'
	+'<td bgcolor="#29568E" align=right class=top>'+ strDat +'&nbsp;&nbsp;&nbsp;&nbsp;</td>'
	+'</tr><tr><td height=3 bgcolor="#cecece" colspan=2></td></tr></table>'
	+'<table border="0" width="100%" cellspacing="" cellpadding="0"><tr><td background="' +BaseDir  + 'http://www.okepscor.org/images/topback2.jpg"><img border="0" src="' +BaseDir  + 'http://www.okepscor.org/test/images/epscor website logo w text.JPG" width="250" height="110" valign="left"></td> '
	+'<td background="' +BaseDir  + 'images/topback.jpg" align="right">'
//	+'<tr><td bgcolor="#29568e" class="top">Experimental Program To Stimulate Competitive Research</td>'
//	+'<img src="' +BaseDir  + 'images/image0.jpg" id="ImageChanger" height=101><img src="' +BaseDir  + 'images/spacer.gif" width=20 height="1">'
	+'</td></tr></table>'
	+'<table cellpadding=0 cellspacing=0 border=0 width=100%><tr>'
//	+'<td bgcolor="#29568e" height=8 colspan=10></td></tr>'
// /\ line over menu color

if(document.all)
	MyString+='<tr>'
else
	MyString+='<tr bgcolor=#29568E height=15>'


MyString+='<td colspan=1><span class="topmenu" id="Span1" onmouseover="ChangeOver(1);" onmouseout="ChangeOut(1)" onclick=GotoUrl("http://www.okepscor.org/default.asp")>HOME</span></td>'
	+'<td colspan=1><span class="topmenu" id="Span2"  onmouseover="ChangeOver(2);" onmouseout="ChangeOut(2)" onclick=GotoUrl("http://www.okepscor.org/history.asp")>HISTORY</span></td>'
	+'<td colspan=1><span class="topmenu" id="Span3" onmouseover="ChangeOver(3);" onmouseout="ChangeOut(3)" onclick=GotoUrl("http://www.okepscor.org/programs.asp")>PROGRAMS</span></td>'
	+'<td colspan=1><span class="topmenu" id="Span4" onmouseover="ChangeOver(4);" onmouseout="ChangeOut(4)" onclick=GotoUrl("http://www.okepscor.org/funding.asp")>FUNDING</span></td>'
	+'<td colspan=1><span class="topmenu" id="Span5" onmouseover="ChangeOver(5);" onmouseout="ChangeOut(5)" onclick=GotoUrl("http://www.okepscor.org/events.asp")>EVENTS</span></td>'
	+'<td colspan=1><span class="topmenu" id="Span6" onmouseover="ChangeOver(6);" onmouseout="ChangeOut(6)" onclick=GotoUrl("http://www.okepscor.org/news.asp")>NEWS</span></td>'
MyString+='<td colspan=1><span class="topmenu" id="Span7" onmouseover="ChangeOver(7);" onmouseout="ChangeOut(7)" onclick=GotoUrl("http://www.okepscor.org/resources.asp")>RESOURCES</span></td>'
	+'<td colspan=1><span class="topmenu" id="Span8" onmouseover="ChangeOver(8);" onmouseout="ChangeOut(8)" onclick=GotoUrl("HTTP://www.okepscor.org/Events/NSFRetreat/NSFRetreat2009.htm")>RESEARCHERS</span></td>'
	+'<td colspan=1><span class="topmenu" id="Span9" onmouseover="ChangeOver(9);" onmouseout="ChangeOut(9)" onclick=GotoUrl("http://www.okepscor.org/contact.asp")>CONTACT US</span></td>'
	+'</tr></table>';

//This table is for spacing on left and right
MyString+='<table width=95% cellpadding=0 cellspacing=0 align=center border=0><tr><td>'

document.write(MyString);
ChangeImage();