//  --------------------------------------------------------------------------------
//  Start Frame-Breaker Script
//  --------------------------------------------------------------------------------

if (window != top) top.location.href = location.href;

//  --------------------------------------------------------------------------------
//  Start Frame-Breaker Script
//  --------------------------------------------------------------------------------



//  --------------------------------------------------------------------------------
//  Start Error-blocking Script
//  --------------------------------------------------------------------------------

function blockError(){return true;}
window.onerror = blockError;

//  --------------------------------------------------------------------------------
//  End Error-blocking Script
//  --------------------------------------------------------------------------------


//  --------------------------------------------------------------------------------
//  Start Pop-up Resize Window Script
//  --------------------------------------------------------------------------------
   function PopupPic(sPicURL) { 
     window.open( "popup.htm?"+sPicURL, "",  
     "resizable=1,HEIGHT=200,WIDTH=200"); 
   } 
//  --------------------------------------------------------------------------------
//  Start Pop-up Resize Window Script
//  --------------------------------------------------------------------------------


//  --------------------------------------------------------------------------------
//  Start Pop-up Window Script
//  --------------------------------------------------------------------------------

function openWin( windowURL, windowName, windowFeatures ) { 
        return window.open( windowURL, windowName, windowFeatures ) ; 
} 

//  --------------------------------------------------------------------------------
//  End Pop-up Menu Script
//  --------------------------------------------------------------------------------



//  --------------------------------------------------------------------------------
//  Start Form Validation Script
//  --------------------------------------------------------------------------------

function checkrequired(which) {
var pass=true;
if (document.images) {
for (i=0;i<which.length;i++) {
var tempobj=which.elements[i];
if (tempobj.name.substring(0,8)=="required") {
if (((tempobj.type=="text"||tempobj.type=="textarea")&&
tempobj.value=='')||(tempobj.type.toString().charAt(0)=="s"&&
tempobj.selectedIndex==0)) {
pass=false;
break;
         }
      }
   }
}
if (!pass) {
shortFieldName=tempobj.name.substring(8,30).toUpperCase();
alert("Please ensure that the "+shortFieldName+" field was properly completed.");
return false;
}
else
return true;
}

//  --------------------------------------------------------------------------------
//  Start Form Validation Script
//  --------------------------------------------------------------------------------


//  --------------------------------------------------------------------------------
//  Start Login Script
//  --------------------------------------------------------------------------------

function Login(form) {
var username = form.username.value;
var password = form.password.value;
var server = form.server.value;
if (username && password && server) {
var htsite = "http://" + username + ":" + password + "@" + server;
window.location = htsite;
}
else {
alert("Please enter your username and password.");
   }
}
//  --------------------------------------------------------------------------------
//  End Login Script
//  --------------------------------------------------------------------------------



//  --------------------------------------------------------------------------------
//  Start Textsizer Script
//  --------------------------------------------------------------------------------

//Specify affected tags. Add or remove from list:
var tgs = new Array( 'div','td','tr','font','class');

//Specify spectrum of different font sizes:
var szs = new Array( 'xx-small','x-small','small','medium','large','x-large','xx-large' );
var startSz = 2;

function ts( trgt,inc ) {
	if (!document.getElementById) return
	var d = document,cEl = null,sz = startSz,i,j,cTags;
	
	sz += inc;
	if ( sz < 0 ) sz = 0;
	if ( sz > 6 ) sz = 6;
	startSz = sz;
		
	if ( !( cEl = d.getElementById( trgt ) ) ) cEl = d.getElementsByTagName( trgt )[ 0 ];

	cEl.style.fontSize = szs[ sz ];

	for ( i = 0 ; i < tgs.length ; i++ ) {
		cTags = cEl.getElementsByTagName( tgs[ i ] );
		for ( j = 0 ; j < cTags.length ; j++ ) cTags[ j ].style.fontSize = szs[ sz ];
	}
}

//  --------------------------------------------------------------------------------
//  End Textsizer Script
//  --------------------------------------------------------------------------------


//  --------------------------------------------------------------------------------
//  Start Random Image Script
//  --------------------------------------------------------------------------------
var theImages = new Array() 
theImages[0] = 'images/1.gif'
theImages[1] = '2.gif'
theImages[2] = '3.gif'
theImages[3] = '4.gif'
var j = 0
var p = theImages.length;
var preBuffer = new Array()
for (i = 0; i < p; i++){
   preBuffer[i] = new Image()
   preBuffer[i].src = theImages[i]
}
var whichImage = Math.round(Math.random()*(p-1));
function showImage(){
document.write('<img src="'+theImages[whichImage]+'">');
}
//  --------------------------------------------------------------------------------
//  End Random Image Script
//  --------------------------------------------------------------------------------

