document.onmouseover=itemOver;
document.onmouseout=itemOut;

function itemOver(){
var eSrc=window.event.srcElement;
if(eSrc.className=="main_button"){
eSrc.className="main_button_over";
}
}

function itemOut(){
var eSrc=window.event.srcElement;
if(eSrc.className=="main_button_over"){
eSrc.className="main_button";
}
}

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 ttt(loc,tgt,lvl){
 	if(tgt==null){
	  window.location.href=loc;
	}else{
	  parent.frames[tgt].location.href=loc;
	}
  }



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 validateNum(obj)
	{
	  
		if (isNaN(obj.value)){
			alert("Sorry! " + obj.name + " must be only number.");
			obj.focus();
			obj.select();
			return false;
		}
		return true
}

function validateNum1(obj){//aungzk//
	if (isNaN(obj.value)){
		alert("Sorry! It must be only number.")
		obj.focus();
		obj.select();
		return false;
	}
	return true
}

function GoBlank(objText){//aungzk//
	if ((objText.value)==""){
		objText.focus();
	}
}

function validateString(obj){//aungzk//
	if ((isNaN(obj.value))==false){
		alert("Sorry! It must be only string.")
		obj.focus();
		obj.select();
		return false;
	}
	return true
}

function checkNumber(obj){
	for (var i=0; i < obj.length; i++)
	{
		var ch=obj.substring(i,i+1)
		if (ch < "0" || ch > "9" || obj.length == null)
		{
			alert("Sorry! Please  make sure, " + obj.name + " must be only numeric.");
			obj.focus();
			obj.select();
			return false
		}
	}
	return true
}


function m_over(x)
{
   if(x == null)
      x= window;
   x.event.srcElement.style.background="#21508f";
   x.event.srcElement.style.color = "ABCBE3";
   x.event.srcElement.style.cursor = "hand";
}

function m_out(x)
{
   if(x == null)
      x= window;
   x.event.srcElement.style.background="#587bae";
   x.event.srcElement.style.color = "ffcc66";
   x.event.srcElement.style.cursor = "default";
}

function m_overtit(x)
{
   if(x == null)
      x= window;
   x.event.srcElement.style.color = "BD6C04";
   x.event.srcElement.style.cursor = "hand";
}

function m_outh(x)
{
   if(x == null)
      x= window;
    x.event.srcElement.style.color = "336600";
   x.event.srcElement.style.cursor = "hand";
}

function m_out1(x)
{
   if(x == null)
      x= window;
   
   x.event.srcElement.style.color = "BD6C04";
   x.event.srcElement.style.cursor = "default";
}
function m_click(dest)
{
	window.location =dest;
}
function mo_over1(x)
{
   if(x == null)
      x= window;
   x.event.srcElement.style.color = "#336600";
   x.event.srcElement.style.cursor = "hand";
}

function mo_over(x)
{
   if(x == null)
      x= window;
   x.event.srcElement.style.color = "#9CC4DA";
   x.event.srcElement.style.cursor = "hand";
}

function mo_out(x)
{
   if(x == null)
      x= window;
   x.event.srcElement.style.color = "#1BAAF8";
   x.event.srcElement.style.cursor = "default";
}

function m_hand(x)
{
   if(x == null)
      x= window;
   x.event.srcElement.style.cursor = "hand";
}

function getKeyCode(){return window.event.keyCode;}//aungzk//
function setFocus(obj){
	if(getKeyCode()==13){obj.focus();obj.select();window.event.keyCode=0;}
	return true
}

function getKeyCode(){return window.event.keyCode;}//aungzk//
function findURL(obj){
	if(getKeyCode()==13){
		obj.focus();
		obj.select();
		window.event.keyCode=0;
	}
	return true
}
 function itemLink(Link,Target)
 {
            if(Target==null)
            {
                  window.location.href=Link;
            }
            else
            {
                  parent.frames[Target].location.href=Link;
            }
      }
