// JavaScript Document

var curr_lb_div;
var is_modal = false;

function ShowLightBox(lb_div, isModal)
{
    document.getElementById(lb_div).style.display='block';
    document.getElementById('fade').style.display='block';
    curr_lb_div = lb_div;
    if (isModal)
        is_modal = true;
    else is_modal = false;
}

function HideLightBox()
{
    if (document.getElementById(curr_lb_div))
    {
         document.getElementById(curr_lb_div).style.display='none';
         document.getElementById('fade').style.display='none';
         curr_lb_div = '';
    }
}

/* Serach Box*/

function clearDefault(el) {
  if (el.defaultValue==el.value) el.value = ""
}

/* Page Scrolling and show login box*/

function jumpScroll() {
   	window.scroll(0,50); // horizontal and vertical scroll targets
	ShowLightBox('LoginBox');
}

/*  Navigation Over */

sfHover = function() {
	var sfEls = document.getElementById("Navigation").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" sfhover";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);
