function printPage() {
	document.getElementById('objPrintContent').value = "<div style=\"width:404px;\"" + document.getElementById('main').innerHTML + "</div>";
	document.getElementById('objPrintForm').submit();
}

function loadSubPage(u){

try{
var edit=""
	if(document.location.href.toLowerCase().indexOf("editmode=yes")!=-1){
		edit="&editmode=yes"
	}
	document.location.href=u+edit
}
catch(e){
alert(e.description)
}

}

function doSearch() {
	document.location.href = '/Page.aspx?pid=176&search=' + document.getElementById('search').value;
}  	
function doSearchEng() {
	document.location.href = '/Page.aspx?pid=203&search=' + document.getElementById('search').value;
} 

	function printContent() {
	NFW = window.open('','displayWindow');
	win=NFW.window.document; 
	win.writeln('<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN">');
	win.writeln('<html><head>');
	
	//	win.writeln('<sc'+'ript language="javascript" type="text/javascript" >');
	//win.writeln('funtion printContent(){');
	//	win.writeln('window.print();');
	//win.writeln('}');
	//win.writeln('</sc'+'ript>');
	
	win.writeln('<title>Valea: '+ document.title +'</title>');
	 
	 

	
	win.writeln('<link href="clients/valea/styles_print.css" rel="stylesheet" type="text/css"/>');
	win.writeln('</head>');
	win.writeln('<body bgcolor="#ffffff" style="margin: 5px;"><div id="main" style="width:404px;">');
	//win.writeln('<a href="javascript:window.print();">Skriv ut</a></P>');
	//win.writeln(document.getElementById('main').innerHTML);
	
	temp_str = document.getElementById('main').innerHTML;
	temp_str = temp_str.replace("// Skriv ut","");
	temp_str = temp_str.replace("// Print","");
	temp_str = temp_str.replace("personel_search.aspx",".removed_for_print");
temp_str = temp_str.replace("personel.aspx",".removed_for_print");
temp_str = temp_str.replace("personel_list.aspx",".removed_for_print");
temp_str = temp_str.replace("first.aspx",".removed_for_print");
temp_str = temp_str.replace("news.aspx",".removed_for_print");

temp_str = temp_str.replace("styles.css","styles_print.css");




//win.writeln('<span>');
	win.writeln(temp_str);
	//win.writeln('</span>');
	win.writeln('<p>&nbsp;<br>&nbsp;<br>');
	win.writeln('<span id="footer">');
	win.writeln(document.getElementById('footer').innerHTML.replace("document.write(today);",""));
	win.writeln('</span>');
	
	win.writeln('</body></html>');
	win.close();
//	NFW.print();
//	NFW.close();
	
}