//begin image swap js\\---------------------->
function putImage(imgDocID,imgObjName) {
	//   imgDocID - the name or number of the document image to be replaced
	//   imgObjName - the name of the image object to be swapped in
	if (browser) {
	        document.images[imgDocID].src = eval(imgObjName + ".src")
	}
}

//begin new window js\\---------------------->
function PopUpWindow(jsTarget, jsWidth, jsHeight) {
	if (jsWidth == null) {
		jsWidth = 325;
	}
	if (jsHeight == null) {
		jsHeight = 350;
	}
	window.open(jsTarget,"","width=" + jsWidth + ",height=" + jsHeight + ",toolbar=no,location=no,directories=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no");
}

//begin PopUp Help js\\---------------------->
function PopUpHelp(jsTarget, jsWidth, jsHeight) {
	if (jsWidth == null) {
		jsWidth = 325;
	}
	if (jsHeight == null) {
		jsHeight = 350;
	}
  mywin = window.open( '/CustomerService/Help/' + jsTarget,'win','width=' + jsWidth + ',height=' + jsHeight + ',toolbar=no,location=no,directories=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no');
  mywin.focus();
}

//begin clear field js\\---------------------->
var cleared = 0;
function clearField(field) {
  if (cleared != 1){   
    field.value = "";
    cleared=1;}
  else
    cleared = 0;
} 

//begin gotosite js\\---------------------->
function gotosite(site) {
  if (site != "") {
    parent.location=site
  }
}
  
//begin confirmdelete js\\---------------------->
function confirmSubmit(message) {
	if (message != null)
		str = message;
	else
		str = "Are you sure you wish to continue?";
			
	var agree=confirm(str);			
	if (agree)
		return true ;
	else
		return false ;
}
	
//begin no double submit js\\---------------------->
var submitted = false;
function submitCheck() {
	if (submitted) {
		alert("Please wait, proceesing is already in progress....");
		return false;
	}
	else {
		submitted = true;
		return true;
	}
}

//begin protect email from spam js\\-->
function emailink(name, domain, display) {
  displayed=(typeof(display)=="undefined") ? name+"@"+domain : display
  document.write('<a href=mailto:' + name + '@' + domain + '>' + displayed + '</a>');
}

// protect the Return key from performing an action
function stopRKey(evt) { 
  var evt = (evt) ? evt : ((event) ? event : null); 
  var node = (evt.target) ? evt.target : ((evt.srcElement) ? evt.srcElement : null); 
  if ((evt.keyCode == 13) && (node.type=="text"))  {return false;} 
} 
