// setup browser test
//alert(navigator.appName);
//alert(navigator.appVersion);

var isNav = false;
var isNav4 = false;
var isNav5 = false;
var isIE = false;
var isIE4 = false;
var isIE5 = false;
var isIE55 = false;
var isIE6 = false;
var isWin = false;
var isSun = false;
var isMac = false;

isNav = (navigator.appName.indexOf("Netscape")>=0);
isIE = (navigator.appName.indexOf("Internet Explorer")>=0);
isWin = (navigator.appVersion.indexOf("Windows")>=0);
isSun = (navigator.appVersion.indexOf("SunOS")>=0);
isMac = (navigator.appVersion.indexOf("Mac")>=0);

if (isNav) {
	if (parseFloat(navigator.appVersion)<5) {
		isNav4 = true;
	} else {
		isNav5 = true;
	}
} else if (isIE) {
	if (navigator.appVersion.indexOf("MSIE 4")>0) {
		isIE4 = false;
	} else if (navigator.appVersion.indexOf("MSIE 5.0")>0) {
		isIE5 = true;
	} else if (navigator.appVersion.indexOf("MSIE 5.5")>0) {
		isIE55 = true;
	} else if (navigator.appVersion.indexOf("MSIE 6")>0) {
		isIE6 = true;
	}
}

//mouse over changes in TOC
var holdcolor;
var holdline;
function onover() {
	if (isIE) {
		//alert(window.event.srcElement.style.color);
		holdcolor = window.event.srcElement.style.color;
		//alert(holdline);
		
		holdline = window.event.srcElement.style.textDecoration;
		window.event.srcElement.style.color = "#0082cf"
		window.event.srcElement.style.textDecoration = "underline"
	}
}

function onout() {
	if (isIE) {
		//if (holdcolor == "#0082cf") { holdcolor = "#003366"; }
		//if (holdline == "" || holdline == "undefined")  { holdline = "none"; }
		
		window.event.srcElement.style.color = holdcolor;
		window.event.srcElement.style.textDecoration = holdline;
	}
}


function pop(URL) {
  window.open(URL, "GNE", "resizable,scrollbars,status=1,menubar=0,width=720,height=569");
}

function popMain(URL) {
	  if(isWin) {           
	     ArcExplorerWin = window.open(URL,"ArcExplorerWeb","toolbar=no,width=800,height=564,left=5,top=5");    
	  } else if(!isWin && isNav){
	     ArcExplorerWin = window.open("","ArcExplorerWeb","toolbar=no,width=800,height=564,screenX=5,screenY=5");
	     ArcExplorerWin.location = URL;
	  } else if(!isWin && !isNav){
	     ArcExplorerWin = window.open(URL,"ArcExplorerWeb","toolbar=no,width=784,height=548,left=5,top=5");
	  }
}



//define Flash Window
var flashWin;

function showFlash() {
var urlstring = "";
var windowstring = "";

urlstring = "shortflash.html";
if (!flashWin || flashWin.closed) {
	windowstring = "width=500,height=400,scrollbars=no,resizable=no,status=yes,toolbar=no,location=no,directories=no,menubar=no"
	flashWin = open(urlstring,"FlashIntroWindow",windowstring);
} else {
	flashWin.focus();
}
	
}
//table setup for GIS@UD TOC

var table = '<br><table width="150" border="0" cellspacing="2" cellpadding="2" align="left">';
var subtable = '<table width="100%" border="0" cellspacing="1" cellpadding="1" align="left">';
var row = '<tr><td class="toc">';
var subrow = '<tr><td class="subtoc">';
var endrow = '</td></tr>';
var endtable = '</table>';

var arrowup = '<IMG src="images/arrow.gif">';
var arrowdown = '<IMG src="images/arrow_open.gif">';
var spacer = '<IMG width="20" height="1" src="images/blank.gif">';

var tocpathspacer = '<IMG width="10" height="1" src="images/blank.gif">';
var tocpathhome = '<a href="index.php" class="tocpath" onmouseover="onover();" onmouseout="onout();">GIS@UD Home</a><img src="images/sub.gif">';

var tocimage = '<tr><td align="center"><br><br><a href="http://www.gis.com/whatisgis/" target="_new"><IMG src="images/whatisgis.gif" border="0"></a></td></tr>'
var flashmovie = '<tr><td align="center"><br><br><a href="javascript:showFlash();"><IMG src="images/gisintro_flash.jpg" border="0"></a></td></tr>'

//title text for GIS@UD pages
//Major topics
var news = "News"
var gisoncampus = "GIS on Campus"
var education = "Education"
var resources = "Resources"
var data = "GIS Data"
var contact = "Contact Us"

//News
var whatsnew = "What's New?"
var giscal = "GIS Calendars"
var archives = "Archives"

//GIS on Campus
var software = "Software"
var locations = "Locations"
var support = "Support"
var usergroup = "User Group"

var projects = "GIS Projects"
var outreach = "UD Outreach"
var ucgis = "UCGIS Portfolio"

var esri_manuals = "ESRI Manuals"
var esri_software = "ESRI Software"
var leica_software = "Leica Software"


//Education
var overview = "Overview"
var courses = "UD Courses"
var workshops = "Workshops"
var esrivc = "ESRI VC"
var dga = "DGA"
var esrivcclasses = "ESRI VC Classes"

//Resources
var howto = "How-To Pages"
var docs = "Documentation"
var toolsviewers = "GIS Tools & Viewers"
var industry = "GIS Industry & Jobs"
var dgdc = "DGDC"
var links = "GIS Links"
var conferences = "GIS Conferences"
var pres = "Presentations"

var help = "Help Pages"
var techppt = "Technical Presentations"
var arcgisbooks = "ArcGIS Manuals"


//Data
var esridata = "ESRI Data"
var deldata = "Delaware Data"
var delorthos = "Orthophotography"
var usadata = "USA Data"
var worlddata = "World Data"
var statecenters = "State Centers"
var deldata_downloads = "Basemap Data"

//Contact
var rdms = "RDMS"
var gisud = "GIS@UD"

//projects Depts and CEnters
var cadsr = "CADSR"
var dgs = "Delaware Geological Survey"
var geog = "Dept of Geography"
var geol = "Dept of Geology"
var crs = "Center for Remote Sensing"
var ipa = "Institute for Public Administration"
var wra = "Water Resources Agency"
var ocean = "Ocean Information Center"
var drc = "Disaster projects Center"
var spatlab = "Spatial Analysis Lab"
var cieg = "Civil and Env Engineering"


