document.onmouseover=itemOver;
document.onmouseout=itemOut;

function itemOver()
{
var eSrc=window.event.srcElement;
     if(eSrc.className=="main_button")
      {
           eSrc.className="main_button_over";
        }
     if(eSrc.className=="butnormal")
      {
           eSrc.className="butover";
        }   
}

function itemOut()
{
 var eSrc=window.event.srcElement;
     if(eSrc.className=="main_button_over")
     {
        eSrc.className="main_button";
       }
      if(eSrc.className=="butover")
     {
        eSrc.className="butnormal";
       }  
}

function isActive(){
var eSrc=window.event.srcElement;
if(eSrc.className=="text_normal"){
eSrc.className="text_active";
}else if(eSrc.className=="general_text_normal"){
eSrc.className="general_text_active";
}else if(eSrc.className=="login_text_normal"){
eSrc.className="login_text_active";
}
}

function isNormal(){
var eSrc=window.event.srcElement;
if(eSrc.className=="text_active"){
eSrc.className="text_normal";
}else if(eSrc.className=="general_text_active"){
eSrc.className="general_text_normal";
}else if(eSrc.className=="login_text_active"){
eSrc.className="login_text_normal";
}
}



function forDate(Location){
if(Location.value.length==2 || Location.value.length==5){
Location.value=Location.value+'/';
}
}

function curDate()
{
var today;
var dd, mm, yy;
today = new Date();
dd=today.getDate() + "/";
mm=today.getMonth()+1+"/";
yy=today.getFullYear();
return dd+mm+yy;
}


var Message="Corporate Stationery";
var place=1;
function scrollIn() {
window.status=Message.substring(0, place);
if (place >= Message.length) {
place=1;
window.setTimeout("scrollOut()",300);
} else {
place++;
window.setTimeout("scrollIn()",50);
   }
}
function scrollOut() {
window.status=Message.substring(place, Message.length);
if (place >= Message.length) {
place=1;
window.setTimeout("scrollIn()", 100);
} else {
place++;
window.setTimeout("scrollOut()", 50);
   }
}
function butOver(){
	var activeItem=window.event.srcElement;
	if(activeItem.className=="butnormal"){
		  activeItem.className="butover";
	}
}
function butOut(){
	var activeItem=window.event.srcElement;
	if(activeItem.className=="butover"){
		  activeItem.className="butnormal";
	}
}
function getKeyCode(){return window.event.keyCode;}
function setFocus(obj){
	if(getKeyCode()==13){obj.focus();window.event.keyCode=0;}
}
  function mdy(loc,tgt,lvl){
//	if (lvl==null){lvl=50;}
//	if (userlevel<lvl){alert('Unauthorized Access!');return;}
	
		if(tgt==null){
			  window.location.href=loc;
		}else{
			  parent.frames[tgt].location.href=loc;
		}
  }

  function itemLink(Link,Target){
  	if(Target==null){
  		  window.location.href=Link;
  	}else{
  		  parent.frames[Target].location.href=Link;
  	}
}