function setSearchContent()
{
		if (document.forms.searchform.q.value == 'Search the web')
		{
			document.forms.searchform.q.value = '';
		}
}

iehover = function() {
	//if not ie then return
	if (navigator.userAgent.toLowerCase().indexOf('msie') == -1) return;
	
	//get topNav
	var topNav = document.getElementById('sectionNavContainer');
	if (topNav) {
	
		//loop through all lis
		var ieLIs = topNav.getElementsByTagName('li');

		for(var i=0; i<ieLIs.length; i++){
			var li = ieLIs[i];

			//add mouseovers to parents only
			if (li.className.indexOf("sectionNavTop") > -1) {
				li.onmouseover=function() { this.className+=" csshover"; this.getElementsByTagName("a")[0].className="sectionNavTopHover"; }
				li.onmouseout=function() { this.className=this.className.replace(" csshover", ""); this.getElementsByTagName("a")[0].className="sectionNavTop";  }

				//get first ul
				var ul = li.getElementsByTagName("ul")[0];
				if(ul) {
			
					//create iframe and add to li
					var iframe = document.createElement("iframe");	
					iframe.src = "javascript:false";
					iframe.style.height = (ul.offsetHeight + 5) + "px";
					li.appendChild(iframe);			
					
					//set zindexes
					iframe.style.zIndex = 2;
					ul.style.zIndex = 3;
				}			
			}
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", iehover);

function openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function MM_jumpMenuGo(objId,targ,restore){ //v9.0
  var selObj = null;  with (document) { 
  if (getElementById) selObj = getElementById(objId);
  if (selObj) eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0; }
}

function jumpMenuFAQ(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

// flash video version checker 
function MM_CheckFlashVersion(reqVerStr,msg){
  with(navigator){
    var isIE  = (appVersion.indexOf("MSIE") != -1 && userAgent.indexOf("Opera") == -1);
    var isWin = (appVersion.toLowerCase().indexOf("win") != -1);
    if (!isIE || !isWin){
      var flashVer = -1;
      if (plugins && plugins.length > 0){
        var desc = plugins["Shockwave Flash"] ? plugins["Shockwave Flash"].description : "";
        desc = plugins["Shockwave Flash 2.0"] ? plugins["Shockwave Flash 2.0"].description : desc;
        if (desc == "") flashVer = -1;
        else{
          var descArr = desc.split(" ");
          var tempArrMajor = descArr[2].split(".");
          var verMajor = tempArrMajor[0];
          var tempArrMinor = (descArr[3] != "") ? descArr[3].split("r") : descArr[4].split("r");
          var verMinor = (tempArrMinor[1] > 0) ? tempArrMinor[1] : 0;
          flashVer =  parseFloat(verMajor + "." + verMinor);
        }
      }
      // WebTV has Flash Player 4 or lower -- too low for video
      else if (userAgent.toLowerCase().indexOf("webtv") != -1) flashVer = 4.0;

      var verArr = reqVerStr.split(",");
      var reqVer = parseFloat(verArr[0] + "." + verArr[2]);

      if (flashVer < reqVer){
        if (confirm(msg))
          window.location = "http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash";
      }
    }
  }
}

function toggleDisplay(display) {
 if( document.getElementById(display).style.display == "none" ) {
     document.getElementById(display).style.display = "";
   } else {
     document.getElementById(display).style.display = "none"; }
 }
 
function grid_popup(uri)
{
     var winWidth = screen.width - 100;
     var winHeight = screen.height - 100;
     if (winWidth < 790 ) winWidth = 790;
     if (winHeight < 560 ) winHeight = 560;
     var topPos = 50;
     var leftPos = 50;
     var newWindow = window.open( uri, "TVGuide","height=" + winHeight + ",width=" + winWidth +",resizable=yes,scrollbars=auto,toolbar=no,menubar=no,location=no,top=" +topPos + ",left=" + leftPos );
     if ( newWindow.opener == null )
     {
          newWindow.opener = window;
     }
     newWindow.focus();
}
