﻿//To Include all the javascript folder

//function used to update search text box in various case curson there
var txtPrevious = "";
function showHideDefaultMessage(blnshow, txtid) {

    if (blnshow) {
        if (document.getElementById(txtid).value == "" || document.getElementById(txtid).value == " ") {

            document.getElementById(txtid).value = txtPrevious;
          
        }
    }
    else {
        txtPrevious = document.getElementById(txtid).value;
        document.getElementById(txtid).value = "";
    }
}

//function to show hide operation div in pages
function ShowHideOperationDiv(sender, id) {
    if (document.getElementById(id).style.display == "none") {

        document.getElementById(id).style.display = "";
        sender.innerHTML = "-";
    }
    else {
        document.getElementById(id).style.display = "none";
        sender.innerHTML = "+";
    }


}

/* 
//Specify speed of scroll. Larger=faster (ie: 5)
var scrollspeed=cache=1

//Specify intial delay before scroller starts scrolling (in miliseconds):
var initialdelay=1000

function initializeScroller(){
    dataobj = document.all ? document.all.datacontainer : document.getElementById("datacontainer")
    if (dataobj != null) {
        dataobj.style.top = "0px"
        setTimeout("getdataheight()", initialdelay)
    }
}

function getdataheight(){
    thelength=dataobj.offsetHeight
   // thelength = 120;
if (thelength==0)
setTimeout("getdataheight()",30)
else
scrollDiv()
}

function scrollDiv(){
dataobj.style.top=parseInt(dataobj.style.top)-scrollspeed+"px"
if (parseInt(dataobj.style.top)<thelength*(-1))
dataobj.style.top="100px"
setTimeout("scrollDiv()",30)
}

if (window.addEventListener)
window.addEventListener("load", initializeScroller, false)
else if (window.attachEvent)
window.attachEvent("onload", initializeScroller)
else
window.onload=initializeScroller
	

*/



/** script to show-hide div **/
function showDiv(id) {
    document.getElementById(id).style.display = 'block';
}
	
function hideDiv(id) {
    document.getElementById(id).style.display = 'none';
}



