













/*check the screen dimensions to alert users with screens less than 1024x768 that they may want
  to change their resolution to continue*/
var scrollpointer;
function checkScreen(){
	

	if(screen.width<1024 && screen.height<768){
		alert('Your screen resolution has been detected to be:'+screen.width+'x'+screen.height+'.  It is recommended to have a screen resolution of *at least* 1024x768 to view this site optimally.');}
	
}
function redirect(){
 setTimeout(" window.location.reload( false );",2000);  
}


function isNumeric(data)

{
if (data != parseInt(data))
return "";

return data;



   
   }
   /*fade effect to transition page*/
   function transition(targetID,sURL){
   	clearInterval(scrollpointer);
   $(targetID).fadeTo('slow',0.15,function callback() {$(targetID).load(sURL,"",function callback2(){   $(targetID).fadeTo('slow',1);} );})


   }

   /*display panel in modal dialog*/
 function doLoad(_target,_url){
   
    $(_target).slideUp("slow",function() {
     $.ajax({
   url: _url,
   cache:false,
   success:function(response){
       /*included <![if !vml]> hack for IE8, so that word users can insert images*/
       var xmlresp = response.valueOf().replace( new RegExp("src=\"","g"),"src=\"./modules/");

       $(_target).html(xmlresp);$(_target).scrollTop(0);
   }
       
   })
 });

        $(_target).slideDown("slow");


}


 function doLoad(_target,_url,_target2,_url2){
   transition(_target2,_url2);
    $(_target).slideUp("slow",function() {
     $.ajax({
   url: _url,
   cache:false,
   success:function(response){
       /*included <![if !vml]> hack for IE8, so that word users can insert images*/
       var xmlresp = response.valueOf().replace( new RegExp("src=\"","g"),"src=\"./modules/");

       $(_target).html(xmlresp);$(_target).scrollTop(0);
   }

   })
 });

        $(_target).slideDown("slow");


}



   
   


    function startHover(){
uint = setInterval("$('#news').scrollTop($('#news').scrollTop()+1);if((document.getElementById('news').scrollHeight-document.getElementById('news').scrollTop)<=180){document.getElementById('news').scrollTop=0;}",50);
scrollpointer = uint;
return 0;
}
function frm_validate(){
	$('input.validator,input.matches').removeClass("errorfield");	  var frm_errors = "Please correct the following:\n";$('input.validator').each(function(){
	  var regex = new RegExp($(this).attr('regex'));

		if(!this.value.match(regex)){frm_errors+=$(this).attr('errmsg')+"\n";$(this).addClass("errorfield");}
	});
	
	$('input.matches').each(function(){
	  
alert($("#"+$(this).attr('checkfield')).val());

		if(!$(this).val()!=$("#"+$(this).attr('checkfield')).val()){frm_errors+=$(this).attr('errmsg')+"\n";$(this).addClass("errorfield");}
	});
	
	
	
	if(frm_errors!="Please correct the following:\n"){alert(frm_errors);return false;} else {return true;}
}


