
function getLightImg(objImage) 
{
	var strSrc=objImage.src;
	objImage.src=strSrc.replace(".gif","_L.gif");
}
function getOrgImg(objImage) 
{
	var strSrc=objImage.src;
	objImage.src=strSrc.replace("_L.gif",".gif");
}
function setImgSrc(objImage,strSrc) 
{
	objImage.src=strSrc;
}
//########################################################
function viewImage(url) {
  url=url.replace("/",",");
  window.open("viewpic.asp?pic=" + url,'ViewImage','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=auto,resizable=yes,copyhistory=no,width=100,height=100,screenX=150,screenY=150,top=150,left=150')

}
function popupWindow(url) {

  window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,copyhistory=no,width=100,height=100,screenX=150,screenY=150,top=150,left=150')

}
function NewWindow(mypage, myname, w, h, scroll) {

var winl = (screen.width - w) / 2;
var wint = (screen.height - h) / 2;
winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable';
win = window.open(mypage, myname, winprops);

if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}
function NewBgWindow(mypage, myname, w, h, scroll) {

var winl = (screen.width + 10) ;
var wint = (screen.height + 10) ;
winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable';
win = window.open(mypage, myname, winprops);

if (parseInt(navigator.appVersion) >= 4) { window.focus(); }
}
//########################################################
function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}
//########################################################
function getNumAs2Digits(Num){
var str=""
str = str + Num;

if (str.length==1) {str = "0" + str;}

return(str);
}
//########################################################
function getDateTime(){
   var d, s = "";							 //Declare variables.
   d = new Date();                           //Create Date object.
   s += getNumAs2Digits(d.getDate()) + "/";                   //Get day
   s += (getNumAs2Digits(d.getMonth() + 1)) + "/";            //Get month
   s += d.getYear() + " ";                   //Get year.
   s += getNumAs2Digits(d.getHours()) + ":";                  //Get Hours.
   s += getNumAs2Digits(d.getMinutes());                      //Get Minutes.
   return(s);                                //Return date.
}
//########################################################
//########################################################
function ismaxlength(obj){
var mlength=obj.getAttribute? parseInt(obj.getAttribute("maxlength")) : ""
if (obj.getAttribute && obj.value.length>mlength)
obj.value=obj.value.substring(0,mlength)

if(obj.value.length == mlength)
	alert ("You are exceeding the maximum limit(" + mlength +")")
}
//########################################################
function MyNewWindow(mypage,myname,w,h,scroll,pos){
if(pos=="random"){LeftPosition=(screen.width)?Math.floor(Math.random()*(screen.width-w)):100;TopPosition=(screen.height)?Math.floor(Math.random()*((screen.height-h)-75)):100;}
if(pos=="center"){LeftPosition=(screen.width)?(screen.width-w)/2:100;TopPosition=(screen.height)?(screen.height-h)/2:100;}
else if((pos!="center" && pos!="random") || pos==null){LeftPosition=0;TopPosition=20}
settings='width='+w+',height='+h+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=yes';
win=window.open( mypage,myname,settings);
}

//########################################################
function CloseChild(myurl){
window.opener.location=myurl;
window.close();
}