/*toggling the help for searching*/
function showHelp(){
		objhelp= document.getElementById('helptext');
		objhelp.style.display = 'block';
}
/*is used as navigation from leftmenu*/
function navigate(url){
		window.location = url;
}
//IE only :-(
window.onbeforeprint=printfunction;
/*this function removes the menu from the printpage*/
function printfunction(){
		divs = document.getElementsByTagName( 'DIV' );
			for(var i=0;i<divs.length;i++){
				if(!divs[i].id){
					divs[i].style.display='none';
				}
			}
		}
/*This function is used to manipulate the links which should open in a new window  */
function linknewwindow(){
		objects = document.getElementsByTagName( 'DIV' )
		for( var i =0;i<objects.length;i++){
			if(objects[i].name){
				if( objects[i].name=="linknewwindow" ){
					objChild = objects[i].firstChild;
						if (objChild.tagName=="A"){
							//replace target only if this is an attachment
							if( objChild.href.toLowerCase().indexOf( '$file' )>-1 ) {
								objChild.setAttribute("target", "_blank");
							}
						}
				}
			}
		}
}
