// JavaScript Document
<!--
function openSearchWindow()
{
	//this function takes the input of the search text box and then opens a new Microsoft Search window. The search is limited to the home magazine section.(www.microsoft.com/canada/home)
	strText = "http://search.microsoft.com/results.aspx?mkt=en-CA&q=site:www.microsoft.com/canada/home+" + document.forms[0].qu.value;
	OpenWindow(strText);
	
}


function OpenWindow(URL)
{
	window.open(URL,'_blank','toolbar=yes,location=no,directories=no,menubar=yes,status=no,scrollbars=yes,resizable=yes,width=700,height=400,top=50,left=50');
}

function openWindow(width,height,url) {
    x = (640 - width)/2, y = (480 - height)/2;

    if (screen) {
        y = (screen.availHeight - height)/2;
        x = (screen.availWidth - width)/2;
    }
    window.open(url,'newWin','scrollbars=yes,width='+width+',height='+height+',screenX='+x+',screenY='+y+',top='+y+',left='+x+',resizable=yes');
}

function showFeatureGroup(){
 try{
    //alert(showFeatureGroup.arguments[0] + GetRandNumber(showFeatureGroup.arguments[1]) + '-' + document.getElementById(showFeatureGroup.arguments[0] + GetRandNumber(showFeatureGroup.arguments[1])));
    document.getElementById(showFeatureGroup.arguments[0] + GetRandNumber(showFeatureGroup.arguments[1])).style.display='block';
   }catch(ex){
    if(!showFeatureGroup.arguments[2]){
        setTimeout('showFeatureGroup("' +showFeatureGroup.arguments[0] + '", "'+showFeatureGroup.arguments[1] + '",true)',3000);
    }    
  }
}


function clickElement(elementid)
{

    var e = document.getElementById(elementid);
    if (typeof e == 'object') 
    { 
        if(document.createEventObject) 
        { 
            e.fireEvent('onclick');
            return false;
        }
        else if(document.createEvent) 
        { 
            var evObj = document.createEvent('MouseEvents');
            evObj.initEvent('click',true,true);
            e.dispatchEvent(evObj);
            return false;
        }
        else 
        { 
            e.click();
            return false;
        }
    }
 
}

          var mhm_arrow_currentIndex=1;
          function goNextAnchor(){ 
              if (mhm_arrow_currentIndex > countLinks){mhm_arrow_currentIndex=1;}
              else if (mhm_arrow_currentIndex < 1){mhm_arrow_currentIndex=countLinks;} 
              clickElement(goNextAnchor.arguments[0] + mhm_arrow_currentIndex);
          }
//-->
