



function Swoop(dURL, width, height)
	{
	  var desktop = window.open( dURL, "_blank", "toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,width=" + width + ",height=" + height + ",resizable=yes" );
	}

function SwoopMenu(dURL, width, height)
	{
	  var desktop = window.open( dURL, "_blank", "toolbar=yes,location=yes,status=no,menubar=no,scrollbars=yes,width=" + width + ",height=" + height + ",resizable=yes" );
	}

function PopItWin(dURL, width, height, target, toolbars, location, status, menubar, scrollbar, resize)
	{
	  var desktop = window.open( dURL, target, "toolbar=" + toolbars + ",location=" + location + ",status=" + status + ",menubar=" + menubar + ",scrollbars=" + scrollbar + ",width=" + width + ",height=" + height + ",resizable=" + resize );
	}


function SwoopScroll(dURL, width, height)
	{
	  var desktop = window.open( dURL, "_blank", "toolbar=yes,location=no,status=no,menubar=no,scrollbars=yes,width=" + width + ",height=" + height + ",resizable=yes" );
	}

function SwapOut(swp) {
	document.images[swp].src = eval(swp + "On.src"); return true;
	}


function SwapBack(swp) {
	document.images[swp].src = eval(swp + "Off.src"); return true;
	}


function SwapOut2(swp,img) {
	document.images[swp].src = eval(img + "On.src"); return true;
	}


function SwapBack2(swp, img) {
	document.images[swp].src = eval(img + "Off.src"); return true;
	}



function SwoopHome(dURL, width, height)
	{
	  var desktop = window.open( dURL, "_blank", "toolbar=no,location=no,status=no,menubar=no,scrollbars=no,width=" + width + ",height=" + height + ",resizable=no" );
	}

function AREYOUSURE(SuccessURL, Msg) {
      if (!CHECKMEOUT(Msg)) return;
     window.location.href=SuccessURL;
      }

function CHECKMEOUT(Msg) {
	return confirm(Msg);
}



function AREYOUREALLYSURE(SuccessURL, Msg) {
      if (!CHECKMEOUT2(Msg)) return;
     SwoopScroll(SuccessURL,'600', '600');
      }

function CHECKMEOUT2(Msg) {
	return confirm(Msg);
}

function chgBGColor(obj,color){
if (document.all || document.getElementById)
  obj.style.backgroundColor=color;
else if (document.layers)
  obj.bgColor=color;
}

function chgBg(obj,color){
if (document.all || document.getElementById)
  obj.style.backgroundColor=color;
else if (document.layers)
  obj.bgColor=color;
}


function SentenceCase(formobj){

var strText = formobj.value;
var MyLen = strText.length;
var strTemp = "";
var strNew = "";
var myflag = 1;

	for (var i=0;i<MyLen;i++)
	{
		strNew = strText.substr(i,1);
		if (strNew == " ") {
			myflag = 0;
			}
		if (myflag > 1) {
				strNew = strNew.toLowerCase();
			}

		if (myflag == 1){
			strNew = strNew.toUpperCase();
		}

		if (myflag ==0){
			strTemp = strTemp + " ";
		}

		strTemp = strTemp + strNew;
		myflag = myflag + 1;
	}

	formobj.value=strTemp;	
}


//maximize
function Maximize(){

	top.window.moveTo(0,0);
		if (document.all) {
			top.window.resizeTo(screen.availWidth,screen.availHeight);
		}
		else if (document.layers||document.getElementById) {
			if (top.window.outerHeight<screen.availHeight||top.window.outerWidth<screen.availWidth){
			top.window.outerHeight = screen.availHeight;
			top.window.outerWidth = screen.availWidth;
		}
	}


}




function JumpMe(DUrl){
window.location.href=DUrl;
}


function CloseAndRefresh(){
	var sURL = unescape(opener.location.pathname);
	opener.location.href = sURL;
	self.close();
}


function TimeVal(formobj){

  var MyTime =" PM";
  var MyCorrectedTime = "";
  now=new Date();
  hour=now.getHours();
  min=now.getMinutes();

if (hour <= 12){ 
  MyTime =  " AM";
}

if (hour > 12){
  hour = hour - 12;
}

if (min < 10){
  min = min = "0" + min;
}

MyCorrectedTime = hour + ":" + min + MyTime;
formobj.value=MyCorrectedTime;
}

function LockButtons (form,obj) {
	if (form.obj.disabled = true){
	form.obj.disabled = false;
	}

	if (form.obj.disabled = false){
	form.obj.disabled = true;
	}


}


