function keySearchOurPeople() {
    if ( window.event.keyCode == 13 ) {
//        document.form1.cpage.value='1';
        validateForm();
    }
}
function keySearchNews() {
    if ( window.event.keyCode == 13 ) {
//        document.form1.cpage.value='1';
        validateForm();
    }
}
function keySearchEvents() {
    if ( window.event.keyCode == 13 ) {
//        document.form1.cpage.value='1';
        validateEventsForm();
    }
}
function keySearchEvents2() {
    if ( window.event.keyCode == 13 ) {
//        document.form1.cpage.value='1';
        validateEventsForm2();
    }
}
function keySearchArticle() {
    if ( window.event.keyCode == 13 ) {
//        document.form1.cpage.value='1';
        validateForm();
    }
}

function swapImage(objName, imageName) {
    document.imageName.src=objName;
}

// Expand/Collapse function for "Related" drop downs on the right side of Our Services, Our People, Deals+Cases, Knowledge Center...
function expandCollapseMenu(objName) {
    if (document.getElementById(objName).value == '0')
    {
//        document.getElementById(objName + "BlueTop").className = 'SubMenuBlueTopOn';
        document.getElementById(objName + "Row").className = 'ServicesDropDown';
        document.getElementById(objName).value = '1';
        document.getElementById(objName + 'SubMenuGrayBox').className = objName + 'SubMenuGrayBox_on showHand';
        document.getElementById(objName + 'SubMenuGrayBox').innerHTML = '-';
    } else {
//        document.getElementById(objName + "BlueTop").className = 'SubMenuBlueTopOff';
        document.getElementById(objName + "Row").className = 'ServicesDropDown hideBlock';
        document.getElementById(objName).value = '0';
        document.getElementById(objName + 'SubMenuGrayBox').className = objName + 'SubMenuGrayBox showHand';
        document.getElementById(objName + 'SubMenuGrayBox').innerHTML = '+';
    }
}
function expandCollapseSection(objName) {
//	alert(objName);
    try {
        var tmpStr;
        if (document.getElementById(objName).style.display=='block')
        {
            document.getElementById(objName).style.display='none';
            tmpStr = document.getElementById(objName + "Header").innerHTML.replace("[\u2013]","[+]");
            document.getElementById(objName + "Header").innerHTML=tmpStr;
        } else {
            document.getElementById(objName).style.display='block';
            tmpStr = document.getElementById(objName + "Header").innerHTML.replace("[+]","[\u2013]");
            document.getElementById(objName + "Header").innerHTML=tmpStr;
        }
    } catch(e) { }
}
function getPageWidth() {
    var xScroll;
	if (window.scrollMaxY) {	
		xScroll = window.innerWidth + window.scrollMaxX;
	} else if (document.body.scrollWidth > document.body.offsetWidth){ // all but Explorer Mac
		xScroll = document.body.scrollWidth;
	} else { // Explorer Mac...would also work in Explorer 6 Strict, Mozilla and Safari
		xScroll = document.body.offsetWidth;
	}
		
	var windowWidth
		
	if (self.innerWidth) {	// all except Explorer
		if(document.documentElement.clientWidth){
			windowWidth = document.documentElement.clientWidth; 
		} else {
			windowWidth = self.innerWidth;
		}
	} else if (document.documentElement && document.documentElement.clientWidth) { // Explorer 6 Strict Mode
		windowWidth = document.documentElement.clientWidth;
	} else if (document.body) { // other Explorers
		windowWidth = document.body.clientWidth;
	}	
		
	// for small pages with total width less then width of the viewport
	if(xScroll < windowWidth){	
		pageWidth = xScroll;		
	} else {
		pageWidth = windowWidth;
	}

	return [pageWidth];
}

function getPageHeight() {
    var yScroll;

	if (window.innerHeight && window.scrollMaxY) {	
		yScroll = window.innerHeight + window.scrollMaxY;
	} else if (document.body.scrollHeight > document.body.offsetHeight){ // all but Explorer Mac
		yScroll = document.body.scrollHeight;
	} else { // Explorer Mac...would also work in Explorer 6 Strict, Mozilla and Safari
		yScroll = document.body.offsetHeight;
	}
		
	var windowHeight;
		
	if (self.innerHeight) {	// all except Explorer
		windowHeight = self.innerHeight;
	} else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict Mode
		windowHeight = document.documentElement.clientHeight;
	} else if (document.body) { // other Explorers
		windowHeight = document.body.clientHeight;
	}	
		
	// for small pages with total height less then height of the viewport
	if(yScroll < windowHeight){
		pageHeight = windowHeight;
	} else { 
		pageHeight = yScroll;
	}
	
	return [pageHeight];
}
function writeVideoPlayer(sPlayer, sID, sWidth, sHeight, sVers, sAllowFS, sFile, sImage, sStreamer, sControlBar, sWindow) {
    var strVideo;
    
    var so = new SWFObject(sPlayer,sID,sWidth,sHeight,sVers);
    so.addParam('allowfullscreen',sAllowFS);
    so.addParam('allowscriptaccess','always');
    so.addParam('wmode','opaque');
    so.addVariable('file',sFile);
    so.addVariable('image',sImage);
    so.addVariable('streamer',sStreamer);
    so.addVariable('controlbar',sControlBar);
    so.write(sWindow);
    so = null;
}
