function jumpMenu(targ,selObj,restore) {

	if (selObj.options[selObj.selectedIndex].value!='')
		eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");

	if (restore) 
		selObj.selectedIndex=0;


}


function jumpURL(val) {

	alert(val);
	var tafg = "/parent/";
	eval(targ+".location='"+val+"'");

}


function openMovie(url) {

	var tmp = url.split("/");
	var c = tmp.length - 1;
	var mov = tmp[c].split(".");

	window.open('/video/'+mov[0],'IC_DVD','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,left=0,top=10,width=550,height=600)');

}


function openAudio(url) {

	var tmp = url.split("/");
	var c = tmp.length - 1;
	var mov = tmp[c].split(".");

	window.open('/audio/'+mov[0],'IC_DVD','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,left=0,top=10,width=550,height=600)');

}

function openMap(url) {
	var tmp = url.split("/");
	var c = tmp.length - 1;
	var map = tmp[c].split(".");

	window.open('/map/'+map[0],'IC_DVD','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,left=0,top=10,width=550,height=500)');

}



function initPopUps() {

	if (!document.getElementsByTagName){ return; }
	var anchors = document.getElementsByTagName("a");

	// loop through all anchor tags
	for (var i=0; i<anchors.length; i++){
		var anchor = anchors[i];

		// FOR MAPS
		if (anchor.getAttribute("href") && (anchor.getAttribute("rel") == "map")){

			anchor.onclick = function () {openMap(this.href); return false;}
		}
		// FOR VIDEOS
		if (anchor.getAttribute("href") && (anchor.getAttribute("rel") == "movie")){

			anchor.onclick = function () {openMovie(this.href); return false;}
		}
		// FOR AUDIO
		if (anchor.getAttribute("href") && (anchor.getAttribute("rel") == "audio")){

			anchor.onclick = function () {openAudio(this.href); return false;}
		}


	}
}


function correctHuntercombe()
{

	var allElements = document.getElementsByTagName('span');
	var originalBackgrounds=new Array();
	for (var i=0; i<allElements.length; i++)
	{


		if (allElements[i].className.indexOf('huntercombe') !=-1)
		{
			allElements[i].innerHTML = '<a href="http://www.huntercombe.com">The Huntercombe Group <img src="/i/huntercombe.gif" alt="leaf"/></a>';
		}

	}
}


