// JavaScript Library
function myPrint(divId, boolshow, titulo, base)
	{
		var imag = '<p align="center"><img src="../images/banner_print.gif"/></p>';
		var printContent = document.getElementById(divId);
		if(base == null) base = "";

		if (boolshow)
			var WinPrint = window.open('','','left=100,top=100,width=500,height=400,toolbar=0,scrollbars=1,status=0,resizable=1');
		else
			var WinPrint = window.open('','','left=-200,top=-200,width=1,height=1,toolbar=0,scrollbars=0,status=0');
		WinPrint.document.open();
		WinPrint.document.write('<HTML><HEAD><TITLE>'+titulo+'</TITLE><link rel="stylesheet" href="' + base + '/css/windowprint_style.css" type="text/css" /></HEAD>');
		WinPrint.document.write('<BODY>'+ imag + printContent.innerHTML + '</BODY>');
		WinPrint.document.write('</HTML>');
		WinPrint.document.close();
		WinPrint.focus();
		if (!boolshow){
			WinPrint.print();
			WinPrint.close();
		}
		
	}

// Preloading images
//Image1= new Image(233,50);
//Image1.src = "../resources/banner_print.gif";
//alert(controlId);
//alert(document.getElementById(controlId).getAttribute('type'));

function setFocusOn(controlId)
{
	try{
		document.getElementById(controlId).focus();
	}
	catch(e){}
}

function demodrop(val)
{
	alert(val);
}
function showhideItemSearch(controlName){
	if (window.document.getElementById(controlName).style.display=="none"){
		window.document.getElementById(controlName).style.display = "block";
		document.getElementById("txt"+controlName).focus();
//	if (window.document.getElementById(controlName).Class=="invisible"){
//		window.document.getElementById(controlName).Class = "visible";
	}
	else {
		window.document.getElementById(controlName).style.display="none";
	}
}
function addText(controlName,myText){
	document.getElementById("txt"+controlName).value = document.getElementById("txt"+controlName).value + myText;
	document.getElementById("txt"+controlName).focus();
}

