//for div
defaultStep=1 
step=defaultStep
var scrollvalue = 1
function LinkHover(id) 
{
    //alert(document.getElementById(id).style.height);    
    if (scrollvalue == 1) 
    {        
        scrollDivDown(id);
    }            
    else if (scrollvalue == 2)
    { scrollDivUp(id); }
}

function Linkhover(Link) {
    //alert(Link);
    document.location.href = Link;     
}

timerDown="" 
timerUp="" 

function stopMe(){
clearTimeout(timerDown) 
clearTimeout(timerUp)
}


//left & right
defaultStep=1 
mystep=defaultStep
function ScrollDiveLeft(id){
//alert(id)
clearTimeout(timerDown) 
document.getElementById(id).scrollLeft+=step 
timerDown=setTimeout("ScrollDiveLeft('"+id+"')",1)

} 

function ScrollDiveRight(id){
//alert(id)
clearTimeout(timerUp)
document.getElementById(id).scrollLeft-=step 
timerUp=setTimeout("ScrollDiveRight('"+id+"')",1)
} 

timerleft="" 
timerright="" 

function stopMee(){
clearTimeout(timerleft) 
clearTimeout(timerright)
}

document.onmousemove=function(){stopMe()}
document.onmousemove=function(){stopMee()}

function myFocus(element) {
     if (element.value == element.defaultValue) {
       element.value = '';
     }
   }
   function myBlur(element) {
     if (element.value == '') {
       element.value = element.defaultValue;
     }
   }

function bookmarksite(title,url){
if (window.sidebar) // firefox
	window.sidebar.addPanel(title, url, "");
else if(window.opera && window.print){ // opera
	var elem = document.createElement('a');
	elem.setAttribute('href',url);
	elem.setAttribute('title',title);
	elem.setAttribute('rel','sidebar');
	elem.click();
} 
else if(document.all)// ie
	window.external.AddFavorite(url, title);
}


function ValidSearch()
{
	var SearchKey	= document.getElementById('SearchKey');
	if(SearchKey.value == '')
	{
		alert("Enter Keyword");
		SearchKey.value="";
		SearchKey.focus();
		return false;
	}
	
	if(SearchKey.value != '')
	{
		if(trimAll(SearchKey.value) == "")
		{
			alert("Enter Keyword");
			SearchKey.value="";
			SearchKey.focus();
			return false;
		}
		if(nonZero(SearchKey.value))
		{
			alert("Enter proper Keyword");
			SearchKey.value="";
			SearchKey.focus();
			return false;
		}
		if(specialCharSearch(SearchKey.value))
		{
			alert("Enter proper Keyword");
			SearchKey.value="";
			SearchKey.focus();
			return false;
		}
	} 
	return true;
}

