var show;

function ShowAll(val)
{
    show = val;
}

function PrintAll(thisID,PrintAllID,ShowAllID){
    thisID = thisID.replace(PrintAllID,ShowAllID);
    ShowAllID = thisID;
    thisID = thisID.replace(/_/g,"$");
	if(show == 1 || show == null && document.getElementById(ShowAllID) != null)
	{
       show = 0;
       __doPostBack(thisID,'');
        setTimeout('window.print()', 1500);
       
    }
    else{
        window.print();
      
     }
}

function pausecomp(millis) 
{
var date = new Date();
var curDate = null;

do { curDate = new Date(); } 
while(curDate-date < millis);
} 



function modClearSearch(textbox,deflt) {
    if (textbox.value == deflt) {
        textbox.value = "";
    }
}

function modResetSearch(textbox,deflt) {
    if (textbox.value.replace(new RegExp(" ", "g"),'') == "") {
        textbox.value = deflt;
    }
}

function enter(objref,e,path) {

    var code = e.keyCode || e.which;
	if(code == 13) {
	var value = objref.id.replace(/_/g,"$");
	WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions("'"+ value + "'", "", false, "",path, false, false));
	}
}
