function extractHTML(){
	var strContent = document.getElementById("content").innerHTML;
	var strTitle = document.getElementsByTagName("H1")[0].innerHTML;
	strContent = strContent.substring(strContent.indexOf("<!--breadcrumbs-->"), strContent.length)
	return [strTitle, strContent];
}
function openPrint(){	
	var strContent = extractHTML();
	writeConsole(strContent[0], strContent[1]);
}
function writeConsole(title, content) {
 top.consoleRef=window.open('','myconsole',
  'width=640,height=480'
   +',menubar=1'
   +',toolbar=0'
   +',status=0'
   +',scrollbars=1'
   +',resizable=1')
 top.consoleRef.document.writeln(
  '<html><head><title>Print Page</title><link rel=\"stylesheet\" media=\"all\" type=\"text/css\" href=\"/builder-v9/frame/styles.css\" />'
   +'<link rel=\"stylesheet\" media=\"all\" type=\"text/css\" href=\"/builder-v9/frame/styles-services-finder.css\" /></head>'
   +'<body bgcolor=white style=background:none;padding:10px;text-align:left; onLoad="self.focus()">'
   +'<div align=left><img src=/builder-v9/frame/logo-microsourcing.png></div><br>'
   +content
   +'<script>window.print();</script></body></html>'
 )
 top.consoleRef.document.close()
} 

function openPDF(){
	var strContent = extractHTML();
	$("#extractedTitle").val(strContent[0]);
	$("textarea#extractedContent").attr("value",strContent[1]);
	
	$("#frmPDF").submit();
}	
