var sendToAFriendCount = 1;

function divSwap(theDiv, state) {
	if (document.getElementById) {
		var theContent = document.getElementById(theDiv);
		theContent.style.display = state;
	}
	return;
}


function hideTime(theDiv){
	var theTime = setTimeout("divSwap('" + theDiv + "','none');",2000);
}

// Loads Images into menuListSrc array it then preloads them
if (document.getElementByID){
	menuListSrc = new Array(
		"img/langBtnArOvr.gif",
		"img/externalMainOvr.gif",
		"img/externalLeftOvr.gif",
		"img/submitBtnOvr.gif")
		
	menuList = new Array();
	for (counter in menuListSrc){
		menuList[counter] = new Image();
		menuList[counter].src = menuListSrc[counter];
	}
};

function menuOver(pog,overState){
	if (!document.images){
		return
	};
	var theImg = document.images[pog];
	theImg.src = "../img/" + overState 
}


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 MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}


function homeTab(thePanel) {
	
	if (document.getElementById) {
		var oldContent = document.getElementById(theOldPanel);
		//oldContent.style.display = 'none';
		oldContent.className += ' inactiveTab';
		
		var theContent = document.getElementById(thePanel);
		//theContent.style.display = 'block';
		theContent.className = theContent.className.replace(' inactiveTab', '');
		
		
		// Changes the class so tab shows as selected
		var tabChange = document.getElementById(theOldPanel + "tab");
		tabChange.className = 'notSselected';
		
		var tabChange = document.getElementById(thePanel + "tab");
		tabChange.className = 'selected';
		
		theOldPanel = thePanel;
	}
	return;
}


function setPanel(theDiv) {
	var iSendToAFriendEmailCount = 1;
	theOldPanel = theDiv;
	return;
}


function stfAddEmail(){
	sendToAFriendCount++;
	
	var olTarget = document.getElementById("sendToAFriend");
	var listItem = document.createElement("li");
	
	olTarget.appendChild(listItem);
	listItem.innerHTML = "<input name=\"email" + sendToAFriendCount + "\" type=\"text\" value=\"\" class=\"email\" />";
}





// *** Was added by DMO - Monther 11 05 2008 *** //
function setPanoramicFlash(fID,flashName){
	var selectionsPanoramicFlsh;
	selectionsPanoramicFlsh='';
selectionsPanoramicFlsh = '<object id="' + fID + '" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"  ';
selectionsPanoramicFlsh += ' codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="645" height="284"> \r\n';
selectionsPanoramicFlsh += ' <param name="movie" value="'+ flashName +'"  /> \r\n';
selectionsPanoramicFlsh += ' <param name="quality" value="high" /> \r\n';
selectionsPanoramicFlsh += ' <embed src="'+ flashName +'" quality="high"  pluginspage="http://www.macromedia.com/go/getflashplayer"  type="application/x-shockwave-flash" width="645" height="284">\r\n</embed> \r\n' ;
selectionsPanoramicFlsh +='  </object>';
	return selectionsPanoramicFlsh;
	}//

// *** Was added by DMO - Monther 11 05 2008 *** //

