function xHelp(whatURL) {
        
        open( whatURL ,"_help","toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=no,width=500,height=600");
}

function PopUp(whatURL) {
        
        open( whatURL ,"_abc","toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=no,width=700,height=650");
}

function PopUpz(whatURL,xw,xh) {
        var xstr="toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width="+xw+",height=" +xh;
        open( whatURL ,"_abcx",xstr);
}
function showCalendar(ctrl,yy,mm) {
       // var dtnw = new Date();
       //window.open("/linktools/calxx.asp?yy=" + (dtnw.getFullYear()) + "&mm=" + dtnw.getMonth() + "&ctrl=" + ctrl, "", "toolbar=no,directories=no,menubar=no,resizable=no,width=190,height200");
window.open("/uniportal/tools/calxx.asp?yy=" + yy + "&mm=" + mm + "&ctrl=" + ctrl, "_cal","toolbar=no,directories=no,menubar=no,resizable=no,width=190,height=200");

      } 

function showdiv(xdiv) {
var sM=document.getElementById(xdiv);
sM.style.visibility = 'visible';
}

function zViewer(filename)
	{	
	
	img = new Image() ;
	img.src = filename;

	window.imagex=img.width;
	window.imagey=img.height;
	window.imagename=filename;
	viewer=window.open('/uniportal/tools/viewer.asp','VIEWER','scrollbars,status,resizable');
	viewer.opener=window;
	viewer.focus();
	return false;
	}

	
function aSize(xswf,xcolor,x,h,xclassid,xdiv) {
var xrate=screen.width/xdiv ;
x=x * xrate  ;
h=h * xrate ;

document.write ('<div>');
document.write ('<OBJECT  ');
document.write (' codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0"  ');
document.write (' WIDTH=' + x + ' HEIGHT=' + h );
document.write (' <PARAM NAME=movie VALUE="'+xswf+'"><PARAM NAME=quality VALUE=high><PARAM NAME=bgcolor VALUE=#' + xcolor + '> ');
document.write (' <EMBED src="'+xswf+'" quality=high bgcolor=#' + xcolor );
document.write (' WIDTH=' + x + ' HEIGHT=' + h );
document.write (' TYPE="application/x-shockwave-flash"></EMBED></OBJECT>');
document.write ('</div>')
}

function TextReplace(TextIn) {
var findx = prompt ("Text to find ?","")
var temp=""+TextIn.value
if (!findx =='')
{
	var replx = prompt ("Text to replace ?","");
		if (!replx == '') {
			TextIn.value =replaceAll(temp,findx,replx)
		}
}
return TextIn.value;
}

function replaceAll(oldStr,findStr,repStr) {
  var srchNdx = 0; 
  var newStr = ""; 
  while (oldStr.indexOf(findStr,srchNdx) != -1)  {
    newStr += oldStr.substring(srchNdx,oldStr.indexOf(findStr,srchNdx));
    newStr += repStr;
    srchNdx = (oldStr.indexOf(findStr,srchNdx) + findStr.length);
  }
  newStr += oldStr.substring(srchNdx,oldStr.length);
  return newStr;
}

function onTop() {
  if (this.blur) this.focus();
} 

function GetChoosen(whichSelected){
var index=0;
for(i=0;i<whichSelected.length;i++){
	if(whichSelected[i].checked){
	return i;
	}
}
	return 0;
}

function check(form,whichQuestion){
var optionChosen=GetChoosen(form.entry);
if((whichQuestion==1)&&(form.entry[optionChosen].value=="1")||(whichQuestion==2)&&(form.entry[optionChosen].value=="2")||(whichQuestion==3)&&(form.entry[optionChosen].value=="3")||(whichQuestion==4)&&(form.entry[optionChosen].value=="2")||(whichQuestion==5)&&(form.entry[optionChosen].value=="4")){
	form.result.value="Correct!";
}
else{
choice=optionChosen+1;
form.result.value="Choice "+choice+" is incorrect.  Try again.";
}
}

function InsertJS(xxurl,xxjs) {
var gScr='<scr'+ 'ipt type="text' +'/java' +'script"';
gScr=gScr+'  src="'+xxurl+ xxjs +'js">';
gScr=gScr+'</scr'+'ipt>';
document.write(gScr); 
//alert(gScr);
}
