//
// This is a consolidated file comprised of the preious separated Javascript files called:
// menu.opr.js   javascript_menugold.js   common.js    validator_compressed.js    slideshow.js
//
//


// Title: Tigra Menu GOLD
// URL: http://www.softcomplex.com/products/tigra_menu_gold/
// Version: 2.6
// Date: 03-18-2004 (mm-dd-yyyy)
// Notes: Registration needed to use this script legally.
// Visit official site for details.

var TM1a=navigator.userAgent.indexOf('Gecko')>-1||(window.opera&&document.appendChild)?'':window.opera?'width:1;':'width:1;height:1;';document.write('<style>.mlyri{',TM1a,'position:absolute;left:0;top:0}.mlyrh{',TM1a,'position:absolute;left:0;top:0;visibility:hidden}</style>');function TMl(){var TMQ=navigator.appVersion.indexOf('Mac')>-1;this.TMS=navigator.userAgent.indexOf('Safari')>-1;this.TMP=navigator.userAgent.indexOf('MSIE')>-1;this.TMR=TMQ&&this.TMP;this.TM09=document.all?function(TM2){return document.all[TM2]}:function(TM2){return document.getElementById(TM2)};if(TMQ&&navigator.userAgent.indexOf('MSIE 4')>-1)this.TM1d='onLoad';this.TMu=this.TMS?function(n,TM0E,TM0F,TMU){var TM1m={'x':TM0E,'y':TM0F};for(;n;n=n.offsetParent){TM1m.x+=n.offsetLeft;TM1m.y+=n.offsetTop};if(!TMU){if(document.body.leftMargin)TM1m.x-=document.body.leftMargin*1;if(document.body.topMargin)TM1m.y-=document.body.topMargin*1;}return TM1m;}:TMQ?function(n,TM0E,TM0F){var TM1m={'x':TM0E,'y':TM0F};for(;n;n=n.offsetParent){TM1m.x+=n.offsetLeft;TM1m.y+=n.offsetTop};if(document.body.leftMargin)TM1m.x+=document.body.leftMargin*1;if(document.body.topMargin)TM1m.y+=document.body.topMargin*1;return TM1m;}:function(n,TM0E,TM0F){var TM1m={'x':TM0E,'y':TM0F};for(;n;n=n.offsetParent){TM1m.x+=n.offsetLeft;TM1m.y+=n.offsetTop};return TM1m;};this.TMv=function(TM1D,TMe){TM1D.style.visibility=TMe?'visible':'hidden'};this.TMw=function(TM1D,TMh){TM1D.style.left=TMh.x+'px';TM1D.style.top=TMh.y+'px';};this.TMt=window.opera&&!document.appendChild?function(TM1D,TMk){return TM1D.style[TMk?'pixelHeight':'pixelWidth']}:function(TM1D,TMk){return TM1D[TMk?'offsetHeight':'offsetWidth']};}function TM0(TMc){var TMT=false,TM1D;for(var TM2 in menus)if(menus[TM2].TM0L!=null)TMT=true;if(TMT&&TMc)return;for(TM2 in this.TM6)if(TM1D=TM1E.TM09(this.TM6[TM2]))TM1D.style.visibility=TMc?'visible':'hidden';}function TM0_(TM_){var TM1B=this.TM9[0],TMD=TM1B.TM0A('table'),TM1b;if(TM_){var TM0y=TM1B.TM0A('block_top'),TM0u=TM1B.TM0A('block_left'),TM1W='';if(TM0y!=null||TM0u!=null)TM1W=';top:'+TM0y+';left:'+TM0u;if(top!=window&&!this.TM0H||this.TMW)TM1W+=';visibility:hidden';document.write('<div',TM1W?' class=mlyri style="z-index:'+(this.TM13+this.TMi+1)+TM1W+'"':'');TM1b='m'+this.TM1O.id+'m';}else{document.write('<div class=mlyrh onmouseout="menus[\'',this.TM1O.id,'\'].exec(\'',this.id,'\',1)" onmouseover="menus[\'',this.TM1O.id,'\'].exec(\'',this.id,'\',2)" style="z-index:',this.TM1O.TM13+this.TMi+1,'"');TM1b='m'+this.TM1O.id+'c'+this.id;}document.write(' id="',TM1b,'"><table cellpadding="',TMD[0],'" cellspacing="',TMD[1],'" border="',TMD[2],'" class="',TM1B.TM08('table'),'" id="m',this.TM1O.id,'t',this.id,'"><tr>',this.TM1l.join(''),'</tr></table></div>');this.TM15=TM1E.TM09(TM1b);if(TM1E.TMI||(window.opera&&!document.appendChild)){var TM1Q=TM1E.TM09('m'+this.TM1O.id+'t'+this.id);this.TM15.style.width=TM1Q.offsetWidth;}}function TM0X(w,h){var s='<td width="'+w+'"><div style="position:relative;width:'+w+';height:'+h+'">',TM1X=TM1E.TMI||window.opera?' onmousemove="menus[\''+this.TM1O.id+'\'].exec(\''+this.id+'\',2)"':'';for(var TM2=0;TM2<3;TM2++)s=[s,TM2?'<div class=mlyrh id="m'+this.TM1O.id+'i'+this.id+'o'+TM2+'">':'','<table cellpadding="0" cellspacing="0" border="0" width="',w,'" height="',h,'" class="',this.TM08('outer',TM2),'"><tr><td class="',this.TM08('inner',TM2),'">',this.TM03(typeof(this.TM4[0])=='object'?this.TM4[0][TM2]:this.TM4[0],TM2),'</td></tr></table>',TM2?'</div>':''].join('');return[s,'<div class=mlyri><a href="',this.TM4[1]?this.TM4[1]:'','"',this.TM19.tw?' target="'+this.TM19.tw+'"':'',' onclick="return menus[\'',this.TM1O.id,'\'].exec(\'',this.id,'\',0)" onmouseout="menus[\'',this.TM1O.id,'\'].exec(\'',this.id,'\',1)" onmouseover="menus[\'',this.TM1O.id,'\'].exec(\'',this.id,'\',2)"',TM1X,'',this.TM19.ti!=null?' tabindex="'+this.TM19.ti+'"':'','><img src="',TM1E.TM1T,'" width="',w,'" height="',h,'" border="0"',this.TM19.tt?' alt="'+this.TM19.tt+'"':'','></a></div></div></td>',this.TMH[this.TMi]!=this.TM1M.TMg-1&&this.TM1M.TM9[0].TMd?'</tr><tr>':''].join('');}function TM0c(){this.elements=[];for(var TM2=1;TM2<3;TM2++)this.elements[TM2-1]=TM1E.TM09('m'+this.TM1O.id+'i'+this.id+'o'+TM2);}function TM0e(TM1j){if(this.TM1j!=null&&TM1j==this.TM1j)return;if(this.TM1j)TM1E.TMv(this.elements[this.TM1j-1]);if(TM1j)TM1E.TMv(this.elements[TM1j-1],true);this.TM1j=TM1j;}function TM0Y(TM1q){if(this.TM15){TM1E.TMv(this.TM15);for(var TM2=0;TM2<this.TM9.length;TM2++)this.TM9[TM2].TM1h(0);}if(TM1q>=this.TMi){if(this!=this.TM1O.TM1I&&this.TM1h)this.TM1h(0);}else this.TM1M.collapse(TM1q);}function TM0Z(){if(this.TM1O.TM00&&!this.TM1O.TM0L)this.TM1O.TM00();if(!this.TM1O.TM0L&&TM1E.TMp)TM1E.TMv(TM1E.TMp,true);if(this.TM1O.TM0L&&this.TMi<=this.TM1O.TM0L.TMi)this.TM1O.TM0L.collapse((this.TM1O.TM0L.TM1M==this)*1+this.TMi);this.TM1O.TM0L=this;if(this.TM15){this.TM1U();if(!TM1E.TMI)this.TM1O.TM1g();TM1E.TMv(this.TM15,true);}}




// Tigra Menu GOLD
var TMenu_path_to_files='javascript/';

var menus=[],TM1E,TMF=['click','mouseout','mouseover','hide'];function TMm(TMX){for(var i=0;i<menus.length;i++){if(TMX&&menus[i].TM1C&&!menus[i].TM0H)menus[i].TM1C.TM1v.menus[i].TM1V();menus[i].TM1V();menus[i].TMG=true;}this.TMJ=true;}function TMn(TMY){var TM0z;if(this.width!=(TM0z=this.TM02(window))){this.width=TM0z;TMX=TMY=true;}if(this.height!=(TM0z=this.TMy(window))){this.height=TM0z;TMX=TMY=true;}if(this.TM1x!=(TM0z=this.TM04(window))){this.TM1x=TM0z;TMY=true;}if(this.TM1z!=(TM0z=this.TM05(window))){this.TM1z=TM0z;TMY=true;}if(TMY){this.TMJ=false;this.TM1V(TMX)}}function menu(TM0J,TM18,TM14){this.TM0J=TM0J;this.TM18=TM18;this.TM19=[];this.TM0K=[];this.TM9=[];this.exec=TM0O;this.hide=TM0P;this.onhide=TM0S;this.onclick=TM0R;this.onmouseout=TM0T;this.onmouseover=TM0U;this.TM1V=TM0V;this.TMf=TM0_;this.TM1R=this.TMW=this.TM13=0;this.TM1g=function(){};if(TM14){this.TM13=TM14.zIndex||0;this.TM00=TM14.onexpand&&typeof(TM14.onexpand)=='function'?TM14.onexpand:null;this.TMz=TM14.oncollapse&&typeof(TM14.oncollapse)=='function'?TM14.oncollapse:null;if(TM14.wrapper&&typeof(TM14.wrapper)=='function')this.TM03=TM14.wrapper;this.TM0H=Boolean(TM14.frames);this.TMW=TM14.popup?-1:0;this.TMa=Boolean(TM14.showroot);this.TMK=Boolean(TM14.clickcollapse);var TM7=TM14.frames;if(this.TMW){this.collapse=TM0Y;this.expand=TM0Z;if(document.images[TM14.popup]){this.elements=[document.images[TM14.popup]];this.TM1U=TM0d;}else this.TM1U=function(){};}if(TM14.forms){this.TM6=TM14.forms;this.TM1g=TM0;}}if(!this.TM03)this.TM03=TM0g;this.TM1A={'width':100,'height':20,'block_top':null,'block_left':null,'vertical':false,'expd_delay':0,'hide_delay':100,'table':[0,0,0],'css':{'table':'','inner':'','outer':''}};this.TMi=-1;this.TM1O=this;this.TM0A=function(TM1c){return this.TM1A[TM1c];};if(!TM1E){TM1E=new TMl();TM1E.TM1L={'x':0,'y':0};TM1E.TMI=navigator.userAgent.indexOf('Gecko')>-1;TM1E.TM1T=TMenu_path_to_files+'pixel.gif';if(TM1E.TMR){document.write('<div id="TMAnchor" style="position:absolute">.</div>');TM1E.TMo=TM1E.TM09('TMAnchor');}if(TM1E.TMI){document.write('<div id="TMAnchor" style="position:absolute;width:100%;height:100%;top:0;left:0;visibility:hidden"></div>');TM1E.TMp=TM1E.TM09('TMAnchor');}if(!TM1E.TM1d)TM1E.TM1d='onload';TM1E.TM02=window.innerWidth!=null?function(w){return w.innerWidth}:function(w){return w.document.body.offsetWidth};TM1E.TMy=window.innerHeight!=null?function(w){return w.innerHeight}:function(w){return w.document.body.offsetHeight};TM1E.TM04=window.pageXOffset!=null?function(w){return w.pageXOffset}:function(w){return w.document.body.scrollLeft};TM1E.TM05=window.pageYOffset!=null?function(w){return w.pageYOffset}:function(w){return w.document.body.scrollTop};TM1E.TM1V=TMm;TM1E.TMs=TMn;}this.id=TM14&&TM14.key?TM14.key:menus.length;menus[this.id]=this;this.TM1l=[];this.TMg=this.TM0J.length;this.TMZ=Boolean(this.TM18[0].block_top==null&&this.TM18[0].block_left==null);for(var i=0;i<this.TMg;i++)new TM0Q(i,this,this,i);this.TMf(1);this.TM0M=this.TM15;for(i=0;i<this.TM9.length;i++)this.TM9[i].links();if(top!=window&&(TM7&&(TM7+'').indexOf(',')>-1||!TM7)){TM1E.TM1H=TM1E.TMP||(window.opera&&document.appendChild)||TM1E.TMS?top.document.body:top;if(window.frameElement!=null)TM1E.TMy=function(w){return w.frameElement.offsetHeight};if(!top.TM1){top.TM1={'TMB':[]};var TM0w,TM1W=TM1E.TM1H[TM1E.TM1d]?new String(TM1E.TM1H[TM1E.TM1d]):'';if((TM0w=TM1W.indexOf('{'))>-1)TM1W=TM1W.substring(TM0w+1,TM1W.lastIndexOf('}')-1)+';';TM1E.TM1H[TM1E.TM1d]=Function(TM1W+'top.TM1.TM01()');}if(!top.TM1.TMB[this.id])top.TM1.TMB[this.id]={'TM0n':0,'TM7':[],'TM5':[],'TM8':[]};if(this.TM0H&&!top.TM1.TM01){top.TM1.TM01=function(){for(var TM0q=0;TM0q<this.TMB.length;TM0q++){if(this.TMB[TM0q].TM0n<2){this.TMB[TM0q].TM8[0].TM1C=null;return this.TMB[TM0q].TM7[0].setInterval('TM1E.TMs()',500);}for(var TM0t=0;TM0t<this.TMB[TM0q].TM7.length;TM0t++)if(this.TMB[TM0q].TM7[TM0t]&&this.TMB[TM0q].TM7[TM0t].TM1E)this.TMB[TM0q].TM7[TM0t].TM1E.TMs();}setTimeout('top.TM1.TM01()',200)};top.TM1.TMx=function(TM0v,TM0r,TM0h){var TM8=this.TMB[TM0v].TM8;for(var TM0q=0;TM0q<TM8.length;TM0q++)if(TM8[TM0q]&&!TM8[TM0q].TM0K[TM0r])return setTimeout('top.TM1.TMx("'+TM0v+'","'+TM0r+'",'+TM0h+')',100);for(TM0q=0;TM0q<TM8.length;TM0q++)if(TM8[TM0q])TM8[TM0q]['on'+TMF[TM0h]](TM0r);};}var TM17=this.TM1C=top.TM1.TMB[this.id];if(TM17.TM5[name]==null){TM17.TM5[name]=TM17.TM0n;TM17.TM0n++;}TM17.TM7[TM17.TM5[name]]=window;TM17.TM8[TM17.TM5[name]]=this;if(this.TM0H){TM17.TM1v=window;this.TM7=[];for(i=0;i<TM7.length;i++){this.TM7[i]=[];for(var j=0;j<TM7[i].length;j++)this.TM7[i][j]=eval('top.'+TM7[i][j]);}}window.onunload=function(){for(var TM0q=0;TM0q<menus.length;TM0q++){if(menus[TM0q].TM1C){menus[TM0q].TM1C.TM7[menus[TM0q].TM1C.TM5[name]]=menus[TM0q].TM1C.TM8[menus[TM0q].TM1C.TM5[name]]=null;}}};this.TMK=1;}else if(document.layers)window.onload=function(){setInterval('TM1E.TMs()',200)};else if(!TM1E.TM1n)TM1E.TM1n=setInterval('TM1E.TMs()',200);}function TM0V(){if(this.TM1C){this.TM7=this.TM1C.TM1v.menus[this.id].TM7;if(this.TM0H){var TM1y=0,TM1w;this.TM1C.TM0N=[];for(i=0;i<this.TM7.length;i++){TM1w=0;for(j=0;j<this.TM7[i].length;j++){if(!this.TM1C.TM0N[this.TM7[i][j].name])this.TM1C.TM0N[this.TM7[i][j].name]={'x':TM1w,'y':TM1y};TM1w+=TM1E.TM02(this.TM7[i][j]);}TM1y+=TM1E.TMy(this.TM7[i][--j]);}this.TM1C.TM0M=TM1E.TMu(this.TM0M,this.TM1C.TM0N[window.name].x-TM1E.TM04(window),this.TM1C.TM0N[window.name].y-TM1E.TM05(window),TM1E.TMS);}else{TM1E.TMw(this.TM0M,{'x':this.TM1C.TM0M.x-this.TM1C.TM0N[window.name].x+TM1E.TM04(window),'y':this.TM1C.TM0M.y-this.TM1C.TM0N[window.name].y+TM1E.TM05(window)});if(this.TMa)TM1E.TMv(this.TM0M,1);}}if(document.layers)for(var TM0q=0;TM0q<this.TMg;TM0q++)this.TM9[TM0q].TM1h(0);else if(TMV&&!TM1E.TMR)for(var TM0q=0;TM0q<this.TMg;TM0q++)this.TM9[TM0q].TM1U();}function TM0O(id,TM0h){if(!TM1E.TMJ)return;if(this.TM1C&&TM0h)top.TM1.TMx(this.id,id,TM0h);else return menus[this.id]['on'+TMF[TM0h]](id);}function TM0P(){if(this.TM1R>0||!this.TM1p)return;if(this.TM0L)this.TM0L.collapse(this.TMW);this.TM0L=null;if(this.TMz)this.TMz();if(TM1E.TMp)TM1E.TMv(TM1E.TMp);if(!TM1E.TM0G&&!TM1E.TMI)this.TM1g(true);}function TM0S(){if(this.TM0L)this.TM0L.collapse(this.TMW);this.TM0L=null;this.TM1R=0;}function TM0R(id){var i=this.TM0K[id],TMN=Boolean(i.TM4[1]);if(i.TM9&&i.TM1M.TM9[0].TM0m<0)i.expand();else if(i.TMK==null&&this.TMK||i.TMK)this.exec(id,1);i.TM1h(2);return TMN;}function TM0T(id){this.TM1R--;this.TM0K[id].TM1h(0);if(this.TM1o)clearTimeout(this.TM1o);this.TM1p=setTimeout('menus["'+this.id+'"].hide()',this.TM0K[id].TM0A('hide_delay'));if(this.TM0K[id].TM19.sb!=null)top.status='';if(this.TM0K[id].TM19.oo!=null)this.TM0K[id].TM19.oo(id);}function TM0U(id){if(window.event)event.cancelBubble=true;if((TM1E.TMI||window.opera)&&this.TM0K[id].TM1j==1)return;this.TM1R++;for(var TM1J=this.TM0K[id];TM1J!=this;TM1J=TM1J.TM1M)TM1J.TM1h(1);var TM1J=this.TM0K[id];clearTimeout(this.TM1p);this.TM1p=null;if(TM1J.TM19.sb!=null)setTimeout('menus["'+this.id+'"].TM0K["'+id+'"].TM1i()',10);this.TM1I=TM1J;if(TM1J.TM19.oh!=null)TM1J.TM19.oh(id);if(TM1J.TM1M.TM9[0].TM0m<0)return;if(TM1J.TM1M.TM9[0].TM0m)this.TM1o=setTimeout('menus["'+this.id+'"].TM0K["'+id+'"].expand()',TM1J.TM1M.TM9[0].TM0m);else TM1J.expand();}function TM0Q(TM1S,TM1M,TM1O,TM0s){this.id=this.TM1S=new String(TM1S);this.TM1M=TM1M;this.TM1O=TM1O;this.TMH=this.TM1S.split('_');this.TMi=this.TMH.length-1;var TM1k='';for(var i=0;i<=this.TMi;i++)TM1k+='['+(Number(this.TMH[i])+(i?3:0))+']';eval('this.TM4 = this.TM1O.TM0J'+TM1k);if(!this.TM4)return;this.TM19=this.TM4[2]?this.TM4[2]:[];this.TM1O.TM0K[this.id]=this;TM1M.TM9[TM1M.TM9.length]=this;this.TM1h=TM0e;this.TM1i=TM0f;this.TM1U=TM0d;this.TM03=this.TM1O.TM03;this.TMf=TM0X;this.TM0A=TM0a;this.TM08=TM0b;this.links=TM0c;this.collapse=TM0Y;this.expand=TM0Z;this.TMK=this.TM19.cc;if(!TM0s){this.TM0k=this.TM1M.TM19.bt||this.TM0A('block_top');this.TM0j=this.TM1M.TM19.bl||this.TM0A('block_left');this.TMM=this.TM0A('top')<0;this.TML=this.TM0A('left')<0;this.TM11=this.TM0A('width');this.TM0p=this.TM0A('height');this.TMd=this.TM0A('vertical');this.TM12=this.TM0A('wise_pos');this.TM0m=this.TM0A('expd_delay');}var TM10=this.TM1M.TM9[0].TM11,TM0o=this.TM1M.TM9[0].TM0p;if(this.TM1M.TM9[0].TMd){if(this.TM1M.TM19.bw!=null)TM10=this.TM1M.TM19.bw;if(this.TM19.sh!=null)TM0o=this.TM19.sh;}else{if(this.TM1M.TM19.bh!=null)TM0o=this.TM1M.TM19.bh;if(this.TM19.sw!=null)TM10=this.TM19.sw;}this.TM1M.TM1l[TM0s]=this.TMf(TM10,TM0o);this.TMg=this.TM4.length-3;if(this.TMg>0&&this.TM4[3]){this.TM9=[];this.TMq=TM0_;this.TMr=TM0W;if(TMV&&!document.layers){this.TMr();this.TMb=this.TMi==0&&this.TM1O.TMZ;}}}function TM0g(TM1Y){return TM1Y;}function TM0W(){this.TM1l=[];for(var i=0;i<this.TMg;i++)if(this.TM4[3+i])new TM0Q(this.TM1S+'_'+i,this,this.TM1O,i);else this.TMg--;this.TMq();for(i=0;i<this.TM9.length;i++)this.TM9[i].links();}function TM0f(){top.status=this.TM19.sb;}function TM0a(TM1c){var TM1f=null,TMA=this.TM1O.TM18[this.TMi];if(TMA)TM1f=TMA[TM1c];return(TM1f==null?this.TM1M.TM0A(TM1c):TM1f);}function TM0b(TM1e,TM0x){var TM3=this.TM0A('css'),TMC=TM3[TM1e];if(typeof(TMC)=='string')return TMC;for(var TM0l=TM0x;TM0l>=0;TM0l--)if(TMC[TM0l])return TMC[TM0l];}function TM0d(TMh,value){if(this.TMg>0){if(TM1E.TMR){TM1E.TMw(TM1E.TMo,{'x':0,'y':0});TM1E.TM1L=TM1E.TMu(TM1E.TMo,0,0);TM1E.TMR=0;}var TM1K=this.TM9[0],TM1N=TM1E.TMu(this.elements[0],(this.TM19.bl?this.TM19.bl:TM1K.TM0j)-TM1E.TM1L.x,(this.TM19.bt?this.TM19.bt:TM1K.TM0k)-TM1E.TM1L.y,this.TMb);if(TM1K.TML)TM1N.x-=TM1E.TMt(this.TM15);if(TM1K.TMM)TM1N.y-=TM1E.TMt(this.TM15,1);if(TM1K.TM12&&!this.TM1O.TM1C){var wise=TM1K.TM12,TM1s=TM1E.TMt(this.TM15,0),TM0B=TM1E.TMt(this.TM15,1),TM1u=TM1E.TM02(window),TM0D=TM1E.TMy(window),TM1t=TM1E.TM04(window),TM0C=TM1E.TM05(window);if(TM1N.x+TM1s>TM1u+TM1t)TM1N.x=(wise==1?TM1u+TM1t:TM1N.x)-TM1s;if(TM1N.y+TM0B>TM0D+TM0C)TM1N.y=(wise==1?TM0D+TM0C:TM1N.y)-TM0B;if(TM1N.x<TM1t)TM1N.x=TM1t;if(TM1N.y<TM0C)TM1N.y=TM0C;}TM1E.TMw(this.TM15,TM1N);if(this.TM16)TM1E.TMw(this.TM16,TM1N);if(TMV&&!document.layers)for(var TM0q=0;TM0q<this.TMg;TM0q++)this.TM9[TM0q].TM1U();}}var TME=navigator.appVersion.split('MSIE '),TMV=window.opera||TME.length<2||parseFloat(TME[1])<5||(navigator.appVersion.indexOf('Mac')>-1&&navigator.appVersion.indexOf('MSIE')>-1)||navigator.userAgent.indexOf('Konqueror')>-1;document.write('<scr','ipt language="JavaScript" src="',TMenu_path_to_files,'menu.',(document.layers?'lay':TMV?'opr':'dom'),'.js"></scr','ipt>');




//
//
// The open methods below were previously being called with async=true (third argument) however this
// was breaking with the Safari browser so they were set to false to behave synchronously.
//

function fetchDataSync(url,dataToSend,objectID){
  	var pageRequest = false;
  	document.getElementById("error").innerHTML = '';
  	//please_wait(); - actually - we cannot do this because it can break the paymment updates
  	if (window.XMLHttpRequest) pageRequest = new XMLHttpRequest();
  	else if (window.ActiveXObject) pageRequest = new ActiveXObject("Microsoft.XMLHTTP");
  	else return false;
  	pageRequest.onreadystatechange = function () {
	    filterData(pageRequest,objectID);
	}
	if (dataToSend) {
	  var sendData = 'sendData=' + dataToSend;
	  pageRequest.open('POST',url,false);
	  pageRequest.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
	  pageRequest.send(sendData);
	} else {
	  pageRequest.open('GET',url,false);
	  pageRequest.send(null); 
	}
	// Remove the please_wait() message
	//cover_vis=1;
	//document.getElementById('wait_popup').style.display='none'; 
}


function fetchData(url,dataToSend,objectID){
  	var pageRequest = false;
  	document.getElementById("error").innerHTML = '';
  	//please_wait(); - actually - we cannot do this because it can break the paymment updates
  	if (window.XMLHttpRequest) pageRequest = new XMLHttpRequest();
  	else if (window.ActiveXObject) pageRequest = new ActiveXObject("Microsoft.XMLHTTP");
  	else return false;
  	pageRequest.onreadystatechange = function () {
	    filterData(pageRequest,objectID);
	}
	if (dataToSend) {
	  var sendData = 'sendData=' + dataToSend;
	  pageRequest.open('POST',url,true);
	  pageRequest.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
	  pageRequest.send(sendData);
	} else {
	  pageRequest.open('GET',url,true);
	  pageRequest.send(null); 
	}
	// Remove the please_wait() message
	//cover_vis=1;
	//document.getElementById('wait_popup').style.display='none'; 
}

//
//
// There is still a bug in here that is causing an error on Safari browsers only
// pageRequest.status evaluates to 0 on Safari if the XMLhttpRequest is openened with async = true.
//
// Changed the open function aboce to "false" for async operation to accomodate Safari issue.
//
function filterData(pageRequest,objectID){
  	var object = document.getElementById(objectID);
  	
  	if (pageRequest.readyState == 4) {
  		//alert('In filter data - ready state is '+pageRequest.readyState);
  		//alert('page request status is '+pageRequest.status);
	    if (pageRequest.status==200) {
	    	//alert('Page response text is '+pageRequest.responseText);
	    	object.innerHTML = pageRequest.responseText;
	    }
	    else if (pageRequest.status==404)
	    	object.innerHTML = 'Sorry, this information could not be retrieved from the database';
	    else
	    	object.innerHTML = 'Sorry, but there was a problem retrieving information from the database in AJAX filterData() function.';
	}
}


function setEventField(eventlist, event)
{
	var eventlist, event;
	var mylist=document.getElementById(eventlist);
	//alert('setting to: '+mylist.options[mylist.selectedIndex].text);
	document.getElementById(event).value=mylist.options[mylist.selectedIndex].text
}

function setUserCategoryField(dropdown)
{
var mylist=document.getElementById("user_category_list")
document.getElementById("user_category").value=mylist.options[mylist.selectedIndex].text
}

function setUserSubCategoryField(dropdown)
{
var mylist=document.getElementById("user_subcategory_list")
document.getElementById("user_subcategory").value=mylist.options[mylist.selectedIndex].text
}

function setPhoneField(element)
{
var source1=document.getElementById(element+'phone1').value;
var source2=document.getElementById(element+'phone2').value; 
var source3=document.getElementById(element+'phone3').value;
var source4=document.getElementById(element+'phone4').value;
var num='('+source1+') '+source2+'-'+source3;
if (source4!='') num=num+' x'+source4;
document.getElementById(element).value=num ;
}

function dim_input(x,y) {
if (x!='yes') {		
	document.getElementById(y).disabled = true;
	document.getElementById(y).value = '';
	document.getElementById(y).style.background="#cccccc";
} else {
	document.getElementById(y).disabled = false;
	document.getElementById(y).style.background="white";
}
}

function set_checkbox(x,y) {
document.getElementById(x).style.background="#ffffdd";
document.getElementById(y).checked = true;
}

function set_radiobox(x,y,z) {
document.getElementById(x).style.background="#ffffdd";
c=document.getElementById(y+z);
c.checked = true;
}


function setAlert(x)
{
document.all.alertform.alerttext.value = x;
}

function clearAlert()
{
document.all.alertform.alerttext.value = '';
}

function gscopytext(control1,control2)
{
		var text = document.getElementById(control1).value;
		document.getElementById(control2).value = text;				
}



function updateTime(th,control,t_h,t_m) 
{
if (document.getElementById("autocalc").checked == true) {
	if (control.match("ev_start")) {
    
  	var hr = document.getElementById(control+"_hr").value;
  	var min = document.getElementById(control+"_min").value;
  	tm = (Number(hr)*60)+Number(min);
  	nt = tm+Number(document.getElementById("minutes").value);
  	nh=Math.floor(nt/60);
  	nm=nt-(60*nh);
  	for (var i=0; i < document.getElementById(t_h).length; i++) {
  	
	    if (Number(document.getElementById(t_h).options[i].text)==nh) {
		    document.getElementById(t_h).options[i].selected=true;
		    
		}
	}
	
	for (var i=0; i < document.getElementById(t_m).length; i++) {
  	     
	    if (Number(document.getElementById(t_m).options[i].text)==nm) {
		    document.getElementById(t_m).options[i].selected=true;
		     
		}
	}
	}
}
}

function recalcDuration(th1,tm1,th2,tm2,index)
{
	if (index == 0) {
		//alert('Changing class length  ' + th1 + ' ' + tm1 + ' '+ th2 + ' ' + tm2);
	  	var start_hr  = document.getElementById(th1).value;		
	  	var start_min = document.getElementById(tm1).value;	
	  	var end_hr  = document.getElementById(th2).value;		
	  	var end_min = document.getElementById(tm2).value;	
	  	
	  	//alert('Changing class length  ' + start_hr + ' ' + start_min + ' '+ end_hr + ' ' + end_min);
	  	
	  	var diff = ((parseInt(end_min)+(parseInt(end_hr)*60))-((parseInt(start_min))+(parseInt(start_hr*60))));
		  		  	
		//alert('Difference ' + diff);
		if (diff > 0) {
			document.getElementById("minutes").value = diff;
		}
	  	
	}
}



/***********************************************
* Pausing up-down scroller- © Dynamic Drive (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for this script and 100s more.
***********************************************/

function pausescroller(content, divId, divClass, delay){
this.content=content //message array content
this.tickerid=divId //ID of ticker div to display information
this.delay=delay //Delay between msg change, in miliseconds.
this.mouseoverBol=0 //Boolean to indicate whether mouse is currently over scroller (and pause it if it is)
this.hiddendivpointer=1 //index of message array for hidden div
document.write('<div id="'+divId+'" class="'+divClass+'" style="position: relative; overflow: hidden"><div class="innerDiv" style="position: absolute; width: 100%" id="'+divId+'1">'+content[0]+'</div><div class="innerDiv" style="position: absolute; width: 100%; visibility: hidden" id="'+divId+'2">'+content[1]+'</div></div>')
var scrollerinstance=this
if (window.addEventListener) //run onload in DOM2 browsers
window.addEventListener("load", function(){scrollerinstance.initialize()}, false)
else if (window.attachEvent) //run onload in IE5.5+
window.attachEvent("onload", function(){scrollerinstance.initialize()})
else if (document.getElementById) //if legacy DOM browsers, just start scroller after 0.5 sec
setTimeout(function(){scrollerinstance.initialize()}, 500)
}

// -------------------------------------------------------------------
// initialize()- Initialize scroller method.
// -Get div objects, set initial positions, start up down animation
// -------------------------------------------------------------------

pausescroller.prototype.initialize=function(){
this.tickerdiv=document.getElementById(this.tickerid)
this.visiblediv=document.getElementById(this.tickerid+"1")
this.hiddendiv=document.getElementById(this.tickerid+"2")
this.visibledivtop=parseInt(pausescroller.getCSSpadding(this.tickerdiv))
//set width of inner DIVs to outer DIV's width minus padding (padding assumed to be top padding x 2)
this.visiblediv.style.width=this.hiddendiv.style.width=this.tickerdiv.offsetWidth-(this.visibledivtop*2)+"px"
this.getinline(this.visiblediv, this.hiddendiv)
this.hiddendiv.style.visibility="visible"
var scrollerinstance=this
document.getElementById(this.tickerid).onmouseover=function(){scrollerinstance.mouseoverBol=1}
document.getElementById(this.tickerid).onmouseout=function(){scrollerinstance.mouseoverBol=0}
if (window.attachEvent) //Clean up loose references in IE
window.attachEvent("onunload", function(){scrollerinstance.tickerdiv.onmouseover=scrollerinstance.tickerdiv.onmouseout=null})
setTimeout(function(){scrollerinstance.animateup()}, this.delay)
}


// -------------------------------------------------------------------
// animateup()- Move the two inner divs of the scroller up and in sync
// -------------------------------------------------------------------

pausescroller.prototype.animateup=function(){
var scrollerinstance=this
if (parseInt(this.hiddendiv.style.top)>(this.visibledivtop+2)){
this.visiblediv.style.top=parseInt(this.visiblediv.style.top)-2+"px"
this.hiddendiv.style.top=parseInt(this.hiddendiv.style.top)-2+"px"
setTimeout(function(){scrollerinstance.animateup()}, 50)
}
else{
this.getinline(this.hiddendiv, this.visiblediv)
this.swapdivs()
setTimeout(function(){scrollerinstance.setmessage()}, this.delay)
}
}

// -------------------------------------------------------------------
// swapdivs()- Swap between which is the visible and which is the hidden div
// -------------------------------------------------------------------

pausescroller.prototype.swapdivs=function(){
var tempcontainer=this.visiblediv
this.visiblediv=this.hiddendiv
this.hiddendiv=tempcontainer
}

pausescroller.prototype.getinline=function(div1, div2){
div1.style.top=this.visibledivtop+"px"
div2.style.top=Math.max(div1.parentNode.offsetHeight, div1.offsetHeight)+"px"
}

// -------------------------------------------------------------------
// setmessage()- Populate the hidden div with the next message before it's visible
// -------------------------------------------------------------------

pausescroller.prototype.setmessage=function(){
var scrollerinstance=this
if (this.mouseoverBol==1) //if mouse is currently over scoller, do nothing (pause it)
setTimeout(function(){scrollerinstance.setmessage()}, 100)
else{
var i=this.hiddendivpointer
var ceiling=this.content.length
this.hiddendivpointer=(i+1>ceiling-1)? 0 : i+1
this.hiddendiv.innerHTML=this.content[this.hiddendivpointer]
this.animateup()
}
}

pausescroller.getCSSpadding=function(tickerobj){ //get CSS padding value, if any
if (tickerobj.currentStyle)
return tickerobj.currentStyle["paddingTop"]
else if (window.getComputedStyle) //if DOM2
return window.getComputedStyle(tickerobj, "").getPropertyValue("padding-top")
else
return 0
}


/* This script and many more are available free online at
The JavaScript Source!! http://javascript.internet.com
Created by: Robert Nyman | http://robertnyman.com/ */
function removeHTMLTags(strInputCode){
 	// if(document.getElementById && document.getElementById("input-code")){
 		/* var strInputCode = document.getElementById("input-code").innerHTML; */
 		/* 
  			This line is optional, it replaces escaped brackets with real ones, 
  			i.e. < is replaced with < and > is replaced with >
 		*/	
 	 	strInputCode = strInputCode.replace(/&(lt|gt);/g, function (strMatch, p1){
 		 	return (p1 == "lt")? "<" : ">";
 		});
 		var strTagStrippedText = strInputCode.replace(/<\/?[^>]+(>|$)/g, "");
 		// alert("Output text:\n" + strTagStrippedText);	
   // Use the alert below if you want to show the input and the output text
   //		alert("Input code:\n" + strInputCode + "\n\nOutput text:\n" + strTagStrippedText);	
 	// }
   return strTagStrippedText;	
}




var gAutoPrint = true; // Tells whether to automatically call the print function

function printSpecial()
{
if (document.getElementById != null)
{
var html = '<HTML>\n<HEAD>\n';

if (document.getElementsByTagName != null)
{
var headTags = document.getElementsByTagName("head");
if (headTags.length > 0)
html += headTags[0].innerHTML;

}
var html = '<HTML>\n<HEAD></HEAD><BODY>\n';

var printReadyElem = document.getElementById("printReady");

if (printReadyElem != null)
{
html += printReadyElem.innerHTML;
}
else
{
alert("Could not find the printReady function");
return;
}

html += '\n</BODY>\n</HTML>';

var printWin = window.open("","_self","menubar=0, status=0, toolbar=0, location=0, scrollbars=1, height=800");
 printWin.document.open();
 printWin.document.write(html);
 printWin.document.write('<br/>');
 printWin.document.close();
 

 if (gAutoPrint) {
   alert("The page has been formatted for printing. \r\nThe printer dialog will be started automatically\r\nwhen you press OK.\r\n\r\nAfter you are done printing, please use the browser\r\nback button to return to your web page.");
   printWin.print();
 }
 
}
else
{
alert("The print ready feature is only available if you are using a recent browser. Please update your browser.");
}
}

var vis=1;
function show_cover() 
{  

	var cover=document.getElementById('cover');

	if(vis)
	{
		vis=0;
		cover.style.display='block';      
	} 
	else 
	{   
		vis=1;
		cover.style.display='none'; 
	}

}

var cover_vis=1;
function please_wait() 
{  

	var wait_popup=document.getElementById('wait_popup');

	if(cover_vis)
	{
		cover_vis=0;
		wait_popup.style.display='block';      
	} 
	else 
	{   
		cover_vis=1;
		wait_popup.style.display='none'; 
	}

}


// Function limit the length of text placed into a text field
// not that the form must have a name attribute set.
// there should be a span set equivalent to the element name with the suffix _display

function textarea_maxlength(element, maxvalue, form)
     {
     var q = eval("document."+form+"."+element+".value.length");
     var r = q - maxvalue;
     document.getElementById(element+"_display").innerHTML = "Length:"+q+" Remaining: "+(maxvalue - q);
     //alert ("in textarea_maxlength"+element+maxvalue+form);
     var msg = "Sorry, you have input "+q+" characters into the "+
       "text area box you just completed. It can return no more than "+
       maxvalue+" characters to be processed. Please abbreviate "+
       "your text by at least "+r+" characters";
     if (q > maxvalue) alert(msg);
     }


function load()
{
	window.status="Page is loaded";

	if (document.getElementById('side_menu')) { document.getElementById('side_menu').style.display = "block"; }
	if (document.getElementById('top_menu')) { document.getElementById('top_menu').style.display = "block"; }
	if (document.getElementById('scroll_area')) { document.getElementById('scroll_area').style.display = "block"; }
}




var re_dt=/^(\d{1,2})\-(\d{1,2})\-(\d{4})$/,re_tm=/^(\d{1,2})\:(\d{1,2})\:(\d{1,2})$/,a_formats={"alpha":/^[a-zA-Z\.\-]*$/,"alphanum":/^\w+$/,"unsigned":/^\d+$/,"integer":/^[\+\-]?\d*$/,"real":/^[\+\-]?\d*\.?\d*$/,"email":/^[\w-\.]+\@[\w\.-]+\.[a-z]{2,4}$/,"phone":/^[\d\.\s\-]+$/,"date":function(_1){if(!re_dt.test(_1)){return false;}if(RegExp.$1>31||RegExp.$2>12){return false;}var _2=new Date(RegExp.$3,Number(RegExp.$2-1),RegExp.$1);if(_2.getMonth()!=Number(RegExp.$2-1)){return false;}return true;},"time":function(_3){if(!re_tm.test(_3)){return false;}if(RegExp.$1>23||RegExp.$2>59||RegExp.$3>59){return false;}return true;}},a_messages=["No form name passed to validator construction routine","No array of \"%form%\" form fields passed to validator construction routine","Form \"%form%\" can not be found in this document","Incomplete \"%n%\" form field descriptor entry. \"l\" attribute is missing","Can not find form field \"%n%\" in the form \"%form%\"","Can not find label tag (id=\"%t%\")","Can not verify match. Field \"%m%\" was not found","\"%l%\" is a required field","Value for \"%l%\" must be %mn% characters or more","Value for \"%l%\" must be no longer than %mx% characters","\"%v%\" is not valid value for \"%l%\"","\"%l%\" must match \"%ml%\""];function validator(_4,_5,_6){this.f_error=validator_error;this.f_alert=_6&&_6.alert?function(_7){alert(_7);return false;}:function(){return false;};if(!_4){return this.f_alert(this.f_error(0));}this.s_form=_4;if(!_5||typeof (_5)!="object"){return this.f_alert(this.f_error(1));}this.a_fields=_5;this.a_2disable=_6&&_6["to_disable"]&&typeof (_6["to_disable"])=="object"?_6["to_disable"]:[];this.exec=validator_exec;}function validator_exec(){var _8=document.forms[this.s_form];if(!_8){return this.f_alert(this.f_error(2));}b_dom=document.body&&document.body.innerHTML;for(var _9 in this.a_fields){this.a_fields[_9]["n"]=_9;if(!this.a_fields[_9]["l"]){return this.f_alert(this.f_error(3,this.a_fields[_9]));}o_input=_8.elements[_9];if(!o_input){return this.f_alert(this.f_error(4,this.a_fields[_9]));}this.a_fields[_9].o_input=o_input;}if(b_dom){for(var _a in this.a_fields){if(this.a_fields[_a]["t"]){var _b=this.a_fields[_a]["t"],e_labeltag=get_element(_b);if(!e_labeltag){return this.f_alert(this.f_error(5,this.a_fields[_a]));}this.a_fields[_a].o_tag=e_labeltag;e_labeltag.className="tfvNormal";}}}for(var _c in this.a_fields){var _d="";o_input=this.a_fields[_c].o_input;if(o_input.type=="checkbox"){_d=o_input.checked?o_input.value:"";}else{if(o_input.value){_d=o_input.value;}else{if(o_input.options){_d=o_input.selectedIndex>-1?o_input.options[o_input.selectedIndex].value:null;}else{if(o_input.length>0){for(var _e=0;_e<o_input.length;_e++){if(o_input[_e].checked){_d=o_input[_e].value;break;}}}}}}this.a_fields[_c]["v"]=_d.replace(/(^\s+)|(\s+$)/g,"");}var _f=0,n_another,o_format_check;for(var _10 in this.a_fields){o_format_check=this.a_fields[_10]["f"]&&a_formats[this.a_fields[_10]["f"]]?a_formats[this.a_fields[_10]["f"]]:null;this.a_fields[_10].n_error=null;if(this.a_fields[_10]["r"]&&!this.a_fields[_10]["v"]){this.a_fields[_10].n_error=1;_f++;}else{if(this.a_fields[_10]["mn"]&&this.a_fields[_10]["v"]!=""&&String(this.a_fields[_10]["v"]).length<this.a_fields[_10]["mn"]){this.a_fields[_10].n_error=2;_f++;}else{if(this.a_fields[_10]["mx"]&&String(this.a_fields[_10]["v"]).length>this.a_fields[_10]["mx"]){this.a_fields[_10].n_error=3;_f++;}else{if(this.a_fields[_10]["v"]&&this.a_fields[_10]["f"]&&((typeof (o_format_check)=="function"&&!o_format_check(this.a_fields[_10]["v"]))||(typeof (o_format_check)!="function"&&!o_format_check.test(this.a_fields[_10]["v"])))){this.a_fields[_10].n_error=4;_f++;}else{if(this.a_fields[_10]["m"]){for(var _11 in this.a_fields){if(_11==this.a_fields[_10]["m"]){n_another=_11;break;}}if(n_another==null){return this.f_alert(this.f_error(6,this.a_fields[_10]));}if(this.a_fields[n_another]["v"]!=this.a_fields[_10]["v"]){this.a_fields[_10]["ml"]=this.a_fields[n_another]["l"];this.a_fields[_10].n_error=5;_f++;}}}}}}}var _12="",e_first_error;if(_f){for(var _13 in this.a_fields){var _14=this.a_fields[_13].n_error,s_message="";if(_14){s_message=this.f_error(_14+6,this.a_fields[_13]);}if(s_message){if(!e_first_error){e_first_error=_8.elements[_13];}_12+=s_message+"\n";if(b_dom&&this.a_fields[_13].o_tag){this.a_fields[_13].o_tag.className="tfvHighlight";}}}alert(_12);if(e_first_error.focus&&e_first_error.type!="hidden"&&!e_first_error.disabled){eval("e_first_error.focus()");}return false;}for(_13 in this.a_2disable){if(_8.elements[this.a_2disable[_13]]){_8.elements[this.a_2disable[_13]].disabled=true;}}return true;}function validator_error(_15){var s_=a_messages[_15],n_i=1,s_key;for(;n_i<arguments.length;n_i++){for(s_key in arguments[n_i]){s_=s_.replace("%"+s_key+"%",arguments[n_i][s_key]);}}s_=s_.replace("%form%",this.s_form);return s_;}function get_element(_17){return (document.all?document.all[_17]:(document.getElementById?document.getElementById(_17):null));}



