// JavaScript Document



// Function to kick IE into action for CSS Rollovers

startList = function() {

	if (document.all&&document.getElementById) {

		navRoot = document.getElementById("dmenu");

		for (i=0; i<navRoot.childNodes.length; i++) {

			node = navRoot.childNodes[i];

			if (node.nodeName=="LI") {

				node.onmouseover=function() {

				this.className+=" over";

				}

				node.onmouseout=function() {

				this.className=this.className.replace(" over", "");

				}

			}

		}

	}

}

window.onload=startList;



function MM_openBrWindow(theURL,winName,features) { //v2.0

  window.open(theURL,winName,features);

}

function showPic (whichpic, strImageID) {

 if (document.getElementById) {

 var strThumb, strLarge;

  strThumb= document.getElementById(strImageID).src;

  strLarge = document.getElementById('ImagePlaceholder').src;

  document.getElementById(strImageID).src = strLarge;

  document.getElementById('ImagePlaceholder').src = strThumb;

  //document.getElementById('ImageLarge').href = "javascript:PopupPic('" + whichpic.name + "')";

  return false;

 } else {

  return true;

 }

}



function confirmDelete(link)

{

	var agree=confirm("Are you sure you wish to continue?");

	if(agree){

		if(link){

			return window.location=link;

		}else{

			return true;

		}

	}else{

		return false;

	}

}



function PopupPic(sPicURL) { 

	window.open("img/popup.htm?"+sPicURL, "", "resizable=1,height=200,width=200");

}



function MM_findObj(n, d) { //v4.01

  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {

    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}

  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];

  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);

  if(!x && d.getElementById) x=d.getElementById(n); return x;

}



function getFlashMovie(movieName){

	/*  alert (window[movieName] + ", " + document[movieName] + ", " + movieName);*/

	var isIE = navigator.appName.indexOf("Microsoft") != -1;

	return (isIE) ? window[movieName] : document[movieName];

}

function showUnit(text){
	getFlashMovie("ExternalInterfaceExample").sendToFlash1(text);

	document.getElementById('storename').style.border="1px dotted #C39";

	if(document.getElementById(text)){

		document.getElementById('storename').innerHTML=document.getElementById(text).innerHTML;

	}

	document.getElementById(text).style.fontWeight="bold";

	document.getElementById(text).style.fontSize="120%";

	document.getElementById(text).style.color="#F72372";

}

function hideUnit(text){

	getFlashMovie("ExternalInterfaceExample").sendToFlash2(text);

	document.getElementById('storename').style.border="none";

	document.getElementById('storename').innerHTML="";

	document.getElementById(text).style.fontWeight="bold";

	document.getElementById(text).style.fontSize="100%";

	document.getElementById(text).style.color="#F72372";

}

function makeBold(str){

	document.getElementById(str).style.fontWeight="bold";

	document.getElementById(str).style.fontSize="120%";

	document.getElementById(str).style.color="#F72372";

	document.getElementById('storename').style.border="1px dotted #000";

	document.getElementById('storename').innerHTML=document.getElementById(str).innerHTML;

}

function makeNormal(str){

	document.getElementById(str).style.fontWeight="normal";

	document.getElementById(str).style.fontSize="100%";

	document.getElementById(str).style.color="#F72372";

	document.getElementById('storename').style.border="none";

	document.getElementById('storename').innerHTML="";

}


