jQuery.noConflict(); 
//var gAutoPrint = true;

/*function processPrint(id){
alert(id);
if (document.getElementById != null){

var html = '<HTML>\n<HEAD>\n';

if (document.getElementsByTagName != null){

var headTags = document.getElementsByTagName("head");

if (headTags.length > 0) html += headTags[0].innerHTML;

}

html += '\n</HE' + 'AD>\n<BODY>\n';

var printReadyElem = document.getElementById(id);

if (printReadyElem != null) html += printReadyElem.innerHTML;

else{

alert("Error, no contents.");

return;

}

html += '\n</BO' + 'DY>\n</HT' + 'ML>';

var printWin = window.open("","processPrint");

printWin.document.open('',id,'left=100,top=100,width=600');

printWin.document.write(html);

printWin.document.close();

if (gAutoPrint) printWin.print();

} else alert("Browser not supported.");

}
*/
function printWebPart(tagid){
	var browserName=navigator.appName; 
	/*if (browserName=="Microsoft Internet Explorer")
	 {	 
	  var page=tagid+".html";	
	   //window.open(page,"ExcitingDetail",'left=100,top=100,width=600');
	   window.open(page,"ExcitingDetail","height=500,width=730,scrollbars=yes,location=1");
	 }*/
	    if (tagid) {
			var divid=tagid+"1";
			document.getElementById(divid).style.display='none';
	        //build html for print page
	        var html = "<HTML>\n<HEAD>\n"+
	            jQuery("head").html()+
	            "\n</HEAD>\n<BODY><div id=printing_background>\n"+
	            jQuery("#"+tagid).html()+
	            "\n</div></BODY>\n</HTML>";
	        //open new window			
	        var printWP = window.open("","ExcitingDetail",'left=100,top=100,width=600');
	        printWP.document.open();
	        //insert content
	        printWP.document.write(html);
	        printWP.document.close();
			document.getElementById(divid).style.display='block';
        //open print dialog
	        printWP.print();
			closePopUp();
	    }
	}
