/* Style Changing Functions ********************************************/function changeStyleById(id,styleProp,styleValue){	if(document.getElementById){		var elm = document.getElementById(id);		elm.style[styleProp] = styleValue;	}}function setClassById(id,classRef){  if(document.getElementById){	var elm = document.getElementById(id);	elm.className = classRef;	  }}/* New Window Pop Up Function **********************************/function winPopUp(url,name,width,height){// There is a fifth argument variable for Window Options 	var winDimWidth = (width!=''||width!=null) ? 'width='+width : '';	var winDimHeight =  (height!=''||height!=null) ? 'height='+height:'';	var winDimAll = (winDimHeight !=''&&winDimWidth != '') ? ',' + winDimWidth + ',' + winDimHeight : '';	var winOpts =(arguments[4]) ? arguments[4]  : "";	winOpts = winOpts  + winDimAll;	var newPopUp = window.open(url,name,winOpts);	newPopUp.focus();	return false;}/* Utility Functions ************************************************/function addFunctionEventById(id,e,functName){	if(document.getElementById(id)){	  var strFunctBody = functName;	  args="";	  for(var i=3;i<arguments.length;i++){		  if(i>3){args = args + ",";}		  args = args + "'"+arguments[i]+"'";		  }	  strFunctBody = strFunctBody + "("+args+");";	  var elm = document.getElementById(id);	  if(e == "onclick"){strFunctBody = strFunctBody + "return false;";}	  elm[e] = new Function(strFunctBody);	}}/********************************************************************************** Include code at begining of Page.   Parameters:    url [string]  -> The URL of redirected page, file or document  useQueryString [boolean] -> Will extract QueryString from incomingURL and attach it to redirected URL  replaceHistory [boolean] -> Will use location.replace method instead of the normal loction.href  * If no parameters are passed, then the page will be redirected to the homepage************************************************************************************/function redirectPage(url,useQueryString,replaceHistory){	if(url!="" && url!=null){		url = (useQueryString == true || useQueryString == 'true') ? url + location.search : url;		if(replaceHistory == true || replaceHistory == 'true'){			location.replace(url);		}else{			location.href =  url;		}	}else{		location.href = "http://www.worldvision.org"; //Default to redirect to homepage	}}