<!--
function rollover(normal,over,message){
	this.normal = new Image();
	this.normal.src = normal;
	this.over = new Image();
	this.over.src = over;
}

function msover(imgname,message)
{
	window.status = message;
	if (document.images && imgname != defimg)
		document[imgname].src = eval(imgname + ".over.src");
}

function msout(imgname)
{
	if (document.images && imgname != defimg)
	{
        document[imgname].src = eval(imgname + ".normal.src");
		window.status = "";
	}
}

function fullscreen(theURL) 
{
	//window.open(theURL, '', 'fullscreen=yes, scrollbars=auto');
	window.open(theURL, '');
}

function EnLargeMap(CountryID)
{
	window.open("http://www.culturalnavigator.com/cnav_app/resources/maps/enlarge/" + CountryID + ".jpg");
}

function loadPage(theWindowName,theScrollBars,theUrl,theWidth,theHeight)
{
	if(theWindowName == "" || theWindowName == "undefined" || theWindowName == null)
		theWindowName = "urlWindow";
	if(theScrollBars == "" || theScrollBars == "undefined" || theScrollBars == null)
		theScrollBars = "yes";
	if(theUrl !="" && theUrl != "undefined" && theUrl !=null)
	{	
		eval(theWindowName + "=window.open('','" + theWindowName + "','width= " + theWidth + ",height=" + theHeight + ",scrollbars=" + theScrollBars + "');");
		eval(theWindowName + ".location.href = '" + theUrl + "';");
	}
}

function loadCOIHelp(theWindowName, theScrollBars,theUrl,theWidth,theHeight)
{
	if(theWindowName == "" || theWindowName == "undefined" || theWindowName == null)
		theWindowName = "urlWindow";
	//if(theScrollBars == "" || theScrollBars == "undefined" || theScrollBars == null)
		theScrollBars = "yes";
	
	if(theUrl !="" && theUrl != "undefined" && theUrl !=null)
	{
		eval(theWindowName + "=window.open('','" + theWindowName + "','resize,width= " + theWidth + ",height=" + theHeight + ",scrollbars=" + theScrollBars + "');");
		eval(theWindowName + ".location.href = '" + theUrl + "';");
	}
}

function loadBookstore(theWindowName,theUrl)
{
	if(theWindowName == "" || theWindowName == "undefined" || theWindowName == null)
		theWindowName = "urlWindow";
	
	if(theUrl !="" && theUrl != "undefined" && theUrl !=null)
	{	
		eval(theWindowName + "=window.open('','" + theWindowName + "');");
		eval(theWindowName + ".location.href = '" + theUrl + "';");
	}
}

function loadPref()
{
	var prefID = new String(document.MyForm.pref.options[document.MyForm.pref.selectedIndex].value);		
	var prefName = new String(document.MyForm.pref.options[document.MyForm.pref.selectedIndex].text);		

	window.location.href="pref_index.aspx?pref=" + prefID + "&prefName=" + escape(prefName);
}	

function closeWindow()
{
	window.close();

}

function nodeCheckChanged(node)
{
	var status = "Unchecked"; 
	if (node.Checked) status = "Checked"; 
		alert(node.Text);
	//document.getElementById("lblClientSideCheck").innerHTML = status + ": '" + node.Text + "'";
	//ClientSideOnNodeCheckChanged="nodeCheckChanged"
}
 
function openWindow(url) 
{ 
    var newWin = window.open(url, 'newWin'); 
} 

function mnHover(imageID,url)
{
	var imageCtl;
	if (document.getElementById)
		imageCtl=document.getElementById(imageID);		
	else
		imageCtl=document.all(imageID);
	if(imageCtl!=null)
		imageCtl.src=url;
}
	
function changeColor(color,name) 
{
	document.uploadform.elements[name].focus();
	document.uploadform.elements[name].value = "#" + color;
}
	
function InterfaceGetID(name, id) 
{
	document.uploadform.elements[name].focus();
	document.uploadform.elements[name].value = id;
}
	
function AddLink(AppBaseChannel, channelid)
{
	var theWindowName = "AddLink";
	var theFullURL= window.document.URL;
	var theAppBase= theFullURL.substring(theFullURL.indexOf("cnav_app"), theFullURL);
	
	var theLocation = new String("file:");
	var theLocation = theLocation + window.document.location;
	var theLink = "/" + theLocation.substring(theLocation.indexOf("cnav_app"), theLocation.length);
	//channelid = <asp:Literal id="channellabel" runat="server"/>;
	//var theUrl = AppBaseChannel+"/home/addlinks.aspx?channel_id=" + channelid + "&link_title=" + escape(window.document.title) + "&url=" + escape(theLink);
	var theUrl = theAppBase+"cnav_app/modules/home/addlinks.aspx?channel_id=" + channelid + "&link_title=" + escape(window.document.title) + "&url=" + escape(theLink);
	
	var winl = (screen.width - 300) / 2;
	var wint = (screen.height - 140) / 2;
	window.open(theUrl,'_blank','width=400, height=250,top=' + wint + ',left=' + winl + ',scrollbars=no');
}

function PopUpFavorites(targetUrl, UsageLinkId, theWidth, theHeight)
{
	//alert("Wow");	
	var theWindowName = "AddLink";
	var theFullURL= window.document.URL;
	var theAppBase= theFullURL.substring(theFullURL.indexOf("cnav_app"), theFullURL);
	
	var theLocation = new String("file:");
	var theLocation = theLocation + window.document.location;
	var theLink = "/" + theLocation.substring(theLocation.indexOf("cnav_app"), theLocation.length);
	//var theUrl = theAppBase+"cnav_app/modules/home/addlinks.aspx?channel_id=" + channelid + "&link_title=" + escape(window.document.title) + "&url=" + escape(theLink);
	var theUrl ="";
	if(targetUrl.toLowerCase().indexOf("home/addlinks.aspx")>0)
		theUrl = theAppBase + targetUrl + "?link_title=" + escape(window.document.title) + "&url=" + escape(theLink) + "&usagelink_id=" + UsageLinkId;
	else
		theUrl = theAppBase + targetUrl ;
	
	//alert( + theUrl + );	
	//var winl = (screen.width - 300) / 2;
	//var wint = (screen.height - 140) / 2;
	var winl = screen.width/2 -200;
	var wint = screen.height / 2 - 300;
	window.open(theUrl,'_blank','width=' + theWidth + ', height=' + theHeight + ',top=' + wint + ',left=' + winl + ',scrollbars=no');
	
}

function PopUpWindow(targetUrl, theWindowName)
{
	//alert("Wow");	
	
	var theFullURL= window.document.URL;
	var theAppBase= theFullURL.substring(theFullURL.indexOf("cnav_app"), theFullURL);
	
	var theUrl = theAppBase + targetUrl ;
		
	window.open(theUrl, theWindowName);
	
}

function rollbutton(imgname,img)
{
	alert("document.images['" + imgname + "'].src = '" + igm + "';");
}

var timer1;
var imgCt = 26;
var rIndex = 0;	
//CALLED ON ALL BODY LOADS
function doLoad()
{
	//"Did You Know?" rotator
	rotate(); 
}
	
	//"Did You Know?" rotator
function rotate() 
{
	if (document.images)
	{
		if(document.images['Rotater'])
		{
			rIndex++;
			if (rIndex == imgCt) 
			{
				rIndex = 0;
			}
			rIndex = Math.floor(Math.random() * 26);		
			//Get Server URL
			var first_split = window.location.href.split("cnav_app");
			var ServerUrl = "";
			ServerUrl = first_split[0]
			eval("document.images['Rotater'].src = '" + ServerUrl + "cnav_app/modules/home/images/rotate/" + rIndex + ".gif';");
			timer1 = setTimeout("rotate()", 4 * 9000);
		}
	}
}
				
function TrapEnterKD(event){
	if (document.all){
		if (event.keyCode == 13){
			event.returnValue=false;
			event.cancel = true;
		}
	}
	else if (document.getElementById){
		if (event.which == 13){
			event.returnValue=false;
			event.cancel = true;
		}
	}
	else if(document.layers){
		if(event.which == 13){
			event.returnValue=false;
			event.cancel = true;
		}
	}
}

					
function fnTrapKD(btn, event){
	if (document.all){
		if (event.keyCode == 13){
			event.returnValue=false;
			event.cancel = true;
			btn.click();
		}
	}
	else if (document.getElementById){
		if (event.which == 13){
			event.returnValue=false;
			event.cancel = true;
			btn.click();
		}

	}
	else if(document.layers){
		if(event.which == 13){
			event.returnValue=false;
			event.cancel = true;
			btn.click();
		}
	}
}

//CNAV_DEMO
function loadDemoMessage() 
{
	alert("This feature is not available in the Cultural Navigator Demo");
}

function loadDemoLinkMessage()
{
	alert("This link is disabled");
}
//END CNAV_DEMO_2.0

-->

