function showDiv(boxid){
   document.getElementById(boxid).style.display="block";
}

function hideDiv(boxid){
   sleep(300);
   document.getElementById(boxid).style.display="none";

}
function sleep(millis)  {   
	var date = new Date();   
	var curDate = null;   
	do { curDate = new Date();
	}  while(curDate-date < millis); 
}

/* this method allows sub title to be set by inner jsps of the portal pages. This is required to reduce prolifiration of portal pages
just to support varying sub titles 
*/
function setPageSubTitle(subTitle){
	if(document.getElementById("DFCMSAVE1") != null){
		document.getElementById("DFCMSAVE1").innerHTML = subTitle.toLowerCase();
	}
}

/* this method allows sub title to be set from WCM presenation template to the value of title of the conent. This will not override the sub title as  
determined by site area containing the content.   
*/
function setPageSubTitleWCM(subTitle){
	//alert(document.getElementById("DFCMSAVE2").innerHTML);
	if(document.getElementById("DFCMSAVE2") != null && document.getElementById("DFCMSAVE2").innerHTML == '&nbsp;'){		
		document.getElementById("DFCMSAVE2").innerHTML = subTitle;
	}
}
