// JavaScript Document
function CreateBookmarkLink(title,url) {
	if (window.sidebar) { // Mozilla Firefox Bookmark
		window.sidebar.addPanel(title, url,"");
	} else if( window.external ) { // IE Favorite
		window.external.AddFavorite( url, title); 
	} else if(window.opera && window.print) { // Opera Hotlist
		return true; 
	}
 }

function tryz(zf) {
	var movie = window.document.embeds[0];
	movie = getFlashMovieObject('fun_game');
	movie.Zoom(zf);
}


function getFlashMovieObject(movieName)
{
  if (window.document[movieName]) 
  {
      return window.document[movieName];
  }
  if (navigator.appName.indexOf("Microsoft Internet")==-1)
  {
    if (document.embeds && document.embeds[movieName])
      return document.embeds[movieName]; 
  }
  else // if (navigator.appName.indexOf("Microsoft Internet")!=-1)
  {
    return document.getElementById(movieName);
  }
}


_ge=function(id){if(document.getElementById){var elem=document.getElementById(id)}else if(document.all){var elem=document.all[id]}return elem};_gnv=function(element){return element.firstChild.nodeValue};_gnn=function(element){return element.nodeName};_ce=function(element){return document.createElement(element)};hideElementWhereId=function(elementId){var test=_ge(elementId);if(test!=false){_ge(elementId).style.display='none';return true}else{return false}};getRandomNumber=function(lower_limit,upper_limit){return Math.floor((upper_limit-lower_limit+1)*Math.random()+lower_limit)};Array.prototype.inArray=function(search_term){var i=this.length;if(i>0){do{if(this[i]===search_term){return true}}while(i--)}return false};String.prototype.stripTags=function(){return this.replace(/<\/?[^>]+>/gi,'')};String.prototype.countOccurences=function(search_tag,caseInsensitive){if(caseInsensitive===true){var tstring=this.toLowerCase();search_tag=search_tag.toLowerCase()}else{var tstring=this}var startpos=0;var cnt=0;for(var i=0;i<tstring.length;i++){var temp=tstring.indexOf(search_tag,startpos+search_tag.length);if(temp>0){i=temp;startpos=temp;cnt++}}return cnt};Array.prototype.isEmpty=function(){var len=this.length;var empty=0;if(len>0){for(i=0;i<len;i++){if(this[i]==''||this[i]==null||this[i]=='undefined'){empty++}}return(empty==len)?true:false}return false};Array.prototype.countNotNull=function(){var cnt=0;try{if(this.length>0){for(i=0;i<this.length;i++){if(this[i]!=0&&this[i]!=""&&this[i]!=null&&this[i]!="undefined"){cnt++}}}}catch(e){}return cnt};Array.prototype.clear=function(){if(this.length>0){for(i=0;i<this.length;i++){this.pop()}}};gameDoesntWork=function(id){var gdww=window.open(default_js_gamenotwork+'?id='+id,'gdw','width=400,height=300,scrollbar=no,resizable=no');centerWindow(gdww,400,300)};checkPlugins=function(){var cpw=window.open(default_js_checkplugins,'cp','width=400,height=350,scrollbar=no,resizable=no');centerWindow(cpw,400,350)};centerWindow=function(win,w,h){var ah=screen.availHeight;var aw=screen.availWidth;var x=aw/2-w/2;var y=ah/2-h/2;try{win.moveTo(x,y)}catch(e){}};isObject=function(el){return(typeof el=='object')};cutKeywords=function(layer,cnt){var el=_ge(layer);var kw=el.innerHTML;var stripped=kw.replace(/(<([^>]+)>)/ig,"");if(cnt==""||cnt==null||cnt=="undefined"){var cnt=100}var substract=cnt-20;if(stripped.length>cnt){var sh=stripped.substring(0,substract);var _c=0;var _m=",";for(i=0;i<sh.length;i++){if(_m==sh.substr(i,1)){_c++}}var ntxt='';var _d=0;for(i=0;i<kw.length;i++){if(_m==(_s=kw.substr(i,1))){if(++_d>=_c){break}}ntxt+=_s}ntxt+=' (...) <a href="javascript:ocText(\'open\');"><img src="'+images_dir+'/plus.gif" border="0" hspace="0" valign="middle" title="'+default_js_more+'" alt="'+default_js_more+'" /></a>';ocText=function(oc){switch(oc){default:case'open':_ge(layer).innerHTML=kw+' <a href="javascript:ocText(\'close\');"><img src="'+images_dir+'/minus.gif" border="0" hspace="6" valign="middle" /></a>';break;case'close':_ge(layer).innerHTML=ntxt;break}};el.innerHTML=ntxt}};cutManual=function(layer,cnt,tag_limit){var search_tag='<br';if(tag_limit==""||tag_limit==null||tag_limit=="undefined"){var tag_limit=2}var sub=0;var el=_ge(layer);var kw=el.innerHTML;if(cnt==""||cnt==null||cnt=="undefined"){var cnt=110}var substract=cnt-sub;var temp_kw=kw.toLowerCase();var startpos=0;var count_tag=temp_kw.countOccurences(search_tag);if(count_tag>=tag_limit){for(var i=0;i<tag_limit;i++){startpos=temp_kw.indexOf(search_tag,startpos+search_tag.length)}}if(kw.length>=cnt||count_tag>=tag_limit){if(count_tag>=tag_limit&&startpos<cnt-1){ntxt=kw.substr(0,startpos);ntxt+=' (...) <a href="javascript:oclText(\''+layer+'\',\'open\');"><img src="'+images_dir+'/plus.gif" border="0" hspace="0" valign="middle" title="'+default_js_more+'" alt="'+default_js_more+'" /></a>'}else if(startpos>=cnt-1||count_tag<tag_limit){ntxt=kw.substr(0,substract);ntxt+=' (...) <a href="javascript:oclText(\''+layer+'\',\'open\');"><img src="'+images_dir+'/plus.gif" border="0" hspace="0" valign="middle" title="'+default_js_more+'" alt="'+default_js_more+'" /></a>'}}else{ntxt=kw};oclText=function(lay,oc){switch(oc){default:case'open':_ge(lay).innerHTML=kw+' <a href="javascript:oclText(\''+lay+'\',\'close\');"><img src="'+images_dir+'/minus.gif" border="0" hspace="6" valign="middle" /></a>';break;case'close':_ge(lay).innerHTML=ntxt;break}};el.innerHTML=ntxt};var naviExpanded=false;switchCat=function(){var ul=_ge('categories_list');if(ul.childNodes.length>0){for(i=0;i<ul.childNodes.length;i++){var child=ul.childNodes[i];if(child.className=='hidden'||child.className=='visible'){child.className=child.className=='visible'?'hidden':'visible'}}naviExpanded=naviExpanded==true?false:true;var linkMore=_ge('switchLinkMore');var linkLess=_ge('switchLinkLess');if(naviExpanded==true){linkMore.className='hidden';linkLess.className='visible'}else{linkMore.className='visible';linkLess.className='hidden'}}};var flash=new Object();flash.load=function(name,path,width,height,wm){if(typeof deconcept=="undefined")var deconcept=new Object();if(typeof deconcept.util=="undefined")deconcept.util=new Object();if(typeof deconcept.SWFObjectUtil=="undefined")deconcept.SWFObjectUtil=new Object();deconcept.SWFObject=function(swf,id,w,h,ver,c,quality,xiRedirectUrl,redirectUrl,detectKey){if(!document.getElementById){return}this.DETECT_KEY=detectKey?detectKey:'detectflash';this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);this.params=new Object();this.variables=new Object();this.attributes=new Array();if(swf){this.setAttribute('swf',swf)}if(id){this.setAttribute('id',id)}if(w){this.setAttribute('width',w)}if(h){this.setAttribute('height',h)}if(ver){this.setAttribute('version',new deconcept.PlayerVersion(ver.toString().split(".")))}this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion();if(!window.opera&&document.all&&this.installedVer.major>7){deconcept.SWFObject.doPrepUnload=true}if(c){this.addParam('bgcolor',c)}var q=quality?quality:'high';this.addParam('quality',q);this.setAttribute('useExpressInstall',false);this.setAttribute('doExpressInstall',false);var xir=(xiRedirectUrl)?xiRedirectUrl:window.location;this.setAttribute('xiRedirectUrl',xir);this.setAttribute('redirectUrl','');if(redirectUrl){this.setAttribute('redirectUrl',redirectUrl)}};deconcept.SWFObject.prototype={useExpressInstall:function(path){this.xiSWFPath=!path?"expressinstall.swf":path;this.setAttribute('useExpressInstall',true)},setAttribute:function(name,value){this.attributes[name]=value},getAttribute:function(name){return this.attributes[name]},addParam:function(name,value){this.params[name]=value},getParams:function(){return this.params},addVariable:function(name,value){this.variables[name]=value},getVariable:function(name){return this.variables[name]},getVariables:function(){return this.variables},getVariablePairs:function(){var variablePairs=new Array();var key;var variables=this.getVariables();for(key in variables){variablePairs[variablePairs.length]=key+"="+variables[key]}return variablePairs},getSWFHTML:function(){var swfNode="";if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","PlugIn");this.setAttribute('swf',this.xiSWFPath)}swfNode='<embed type="application/x-shockwave-flash" src="'+this.getAttribute('swf')+'" width="'+this.getAttribute('width')+'" height="'+this.getAttribute('height')+'" style="'+this.getAttribute('style')+'"';swfNode+=' id="'+this.getAttribute('id')+'" name="'+this.getAttribute('id')+'" ';var params=this.getParams();for(var key in params){swfNode+=[key]+'="'+params[key]+'" '}var pairs=this.getVariablePairs().join("&");if(pairs.length>0){swfNode+='flashvars="'+pairs+'"'}swfNode+='/>'}else{if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");this.setAttribute('swf',this.xiSWFPath)}swfNode='<object id="'+this.getAttribute('id')+'" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+this.getAttribute('width')+'" height="'+this.getAttribute('height')+'" style="'+this.getAttribute('style')+'">';swfNode+='<param name="movie" value="'+this.getAttribute('swf')+'" />';var params=this.getParams();for(var key in params){swfNode+='<param name="'+key+'" value="'+params[key]+'" />'}var pairs=this.getVariablePairs().join("&");if(pairs.length>0){swfNode+='<param name="flashvars" value="'+pairs+'" />'}swfNode+="</object>"}return swfNode},write:function(elementId){if(this.getAttribute('useExpressInstall')){var expressInstallReqVer=new deconcept.PlayerVersion([6,0,65]);if(this.installedVer.versionIsValid(expressInstallReqVer)&&!this.installedVer.versionIsValid(this.getAttribute('version'))){this.setAttribute('doExpressInstall',true);this.addVariable("MMredirectURL",escape(this.getAttribute('xiRedirectUrl')));document.title=document.title.slice(0,47)+" - Flash Player Installation";this.addVariable("MMdoctitle",document.title)}}if(this.skipDetect||this.getAttribute('doExpressInstall')||this.installedVer.versionIsValid(this.getAttribute('version'))){var n=(typeof elementId=='string')?document.getElementById(elementId):elementId;n.innerHTML=this.getSWFHTML();return true}else{if(this.getAttribute('redirectUrl')!=""){document.location.replace(this.getAttribute('redirectUrl'))}}return false}};deconcept.SWFObjectUtil.getPlayerVersion=function(){var PlayerVersion=new deconcept.PlayerVersion([0,0,0]);if(navigator.plugins&&navigator.mimeTypes.length){var x=navigator.plugins["Shockwave Flash"];if(x&&x.description){PlayerVersion=new deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."))}}else if(navigator.userAgent&&navigator.userAgent.indexOf("Windows CE")>=0){var axo=1;var counter=3;while(axo){try{counter++;axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+counter);PlayerVersion=new deconcept.PlayerVersion([counter,0,0])}catch(e){axo=null}}}else{try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7")}catch(e){try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");PlayerVersion=new deconcept.PlayerVersion([6,0,21]);axo.AllowScriptAccess="always"}catch(e){if(PlayerVersion.major==6){return PlayerVersion}}try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash")}catch(e){}}if(axo!=null){PlayerVersion=new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","))}}return PlayerVersion};deconcept.PlayerVersion=function(arrVersion){this.major=arrVersion[0]!=null?parseInt(arrVersion[0]):0;this.minor=arrVersion[1]!=null?parseInt(arrVersion[1]):0;this.rev=arrVersion[2]!=null?parseInt(arrVersion[2]):0};deconcept.PlayerVersion.prototype.versionIsValid=function(fv){if(this.major<fv.major)return false;if(this.major>fv.major)return true;if(this.minor<fv.minor)return false;if(this.minor>fv.minor)return true;if(this.rev<fv.rev)return false;return true};deconcept.util={getRequestParameter:function(param){var q=document.location.search||document.location.hash;if(param==null){return q}if(q){var pairs=q.substring(1).split("&");for(var i=0;i<pairs.length;i++){if(pairs[i].substring(0,pairs[i].indexOf("="))==param){return pairs[i].substring((pairs[i].indexOf("=")+1))}}}return""}};deconcept.SWFObjectUtil.cleanupSWFs=function(){var objects=document.getElementsByTagName("OBJECT");for(var i=objects.length-1;i>=0;i--){objects[i].style.display='none';for(var x in objects[i]){if(typeof objects[i][x]=='function'){objects[i][x]=function(){}}}}};if(deconcept.SWFObject.doPrepUnload){if(!deconcept.unloadSet){deconcept.SWFObjectUtil.prepUnload=function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){};window.attachEvent("onunload",deconcept.SWFObjectUtil.cleanupSWFs)};window.attachEvent("onbeforeunload",deconcept.SWFObjectUtil.prepUnload);deconcept.unloadSet=true}}if(!document.getElementById&&document.all){document.getElementById=function(id){return document.all[id]}}var getQueryParamValue=deconcept.util.getRequestParameter;var FlashObject=deconcept.SWFObject;var SWFObject=deconcept.SWFObject;var width=width>0?width:'100%';var height=height>0?height:'100%';var fla=new FlashObject(path,name+"_mc",width,height,"6");if(wm=='transparent'){fla.addParam("wmode","transparent")}fla.write(name)};checkCookiesEnabled=function(){var testCookieName='red_8982673';var testCookieValue=1;var cookie=null;setCookie(testCookieName,testCookieValue,1);cookie=getCookie(testCookieName);if(cookie==testCookieValue){eraseCookie(testCookieName);return true}return false};setCookie=function(cookieName,cookieValue,nDays,path){var today=new Date();var expire=new Date();if(nDays==null||nDays==0){nDays=1}expire.setTime(today.getTime()+3600000*24*nDays);document.cookie=cookieName+"="+escape(cookieValue)+";expires="+expire.toGMTString()+";path=/"};eraseCookie=function(name){setCookie(name,"",-1)};getCookie=function(name){var start=document.cookie.indexOf(name+"=");var len=start+name.length+1;if((!start)&&(name!=document.cookie.substring(0,name.length))){return null}if(start==-1){return null};var end=document.cookie.indexOf(";",len);if(end==-1){end=document.cookie.length}return unescape(document.cookie.substring(len,end))};checkGoogleSearch=function(id,field){var f=_ge(id);var fe=f.elements;if(fe[field].value==''||fe[field].value==search_js_defaulttext){alert(search_js_alert);return false}return true};setFormValue=function(formName,formField,formValue){try{var form=eval('document.'+formName);if(typeof form=="object"&&formField!=""){form.elements[formField].value=formValue}}catch(e){alert('error')}};swapGame=function(id,imagepath,link,stars,alttext){var elem=_ge(id);for(i=0;i<elem.childNodes.length;i++){var el=elem.childNodes[i];if(el.className=='photo'){for(j=0;j<el.childNodes.length;j++){var subel=el.childNodes[j];if(subel.tagName=='A'){subel.href=link.href;try{subel.target=link.target;if(link.onclick||subel.onclick){subel.onclick=link.onclick}else if(link.click||subel.click){subel.click=link.click}}catch(e){}for(k=0;k<subel.childNodes.length;k++){var ssubel=subel.childNodes[k];if(ssubel.tagName=='IMG'){ssubel.src=imagepath;ssubel.alt=alttext;ssubel.title=alttext;break}}}else if(subel.tagName=='DIV'&&subel.className=='stars'){subel.innerHTML=showRating(stars,"","get");var dobreak=1;break}}if(dobreak==1)break}else if(el.className=='list'){for(m=0;m<el.childNodes.length;m++){var lisub=el.childNodes[m];if(lisub.tagName=='OL'){for(n=0;n<lisub.childNodes.length;n++){if(lisub.childNodes[n].tagName=='LI'){for(o=0;o<lisub.childNodes[n].childNodes.length;o++){var suba=lisub.childNodes[n].childNodes[o];if(suba.tagName=='A'){suba.className='';break}}}}break}}}}};var actualWidth=0;var actualHeight=0;var startWidth=0;var startHeight=0;var ratio=1.1;zoom=function(inout){var obj=_ge('flashobj');if(actualWidth==0||actualHeight==0){actualWidth=obj.style.width.replace(/px/i,'');actualHeight=obj.style.height.replace(/px/i,'');startWidth=actualWidth;startHeight=actualHeight}switch(inout){case 1:var temp=actualWidth;actualWidth=Math.ceil(ratio*actualWidth);actualHeight=Math.ceil((actualHeight*actualWidth)/temp);break;case-1:var temp=actualWidth;actualWidth=Math.ceil(actualWidth/ratio);actualHeight=Math.ceil((actualHeight*actualWidth)/temp);break}obj.style.width=actualWidth+'px';obj.style.height=actualHeight+'px'};resetZoom=function(){if(startWidth>0&&startHeight>0){var obj=_ge('flashobj');actualWidth=0;actualHeight=0;obj.style.width=startWidth+'px';obj.style.height=startHeight+'px'}};String.prototype.isEmpty=function(){if(this==""||this==null||this=="undefined"){return true}return false};function isArray(obj){if(typeof(obj)!="undefined"&&obj!=""){return(typeof(obj.length)=="undefined")?false:true}return false};function loadZoomNavigation(zoom_images){var zn='';zn='<div id="zoom_toolbar" style="width: 50px !important; text-align: center;">'+'<div class="lupa">'+'<a href="javascript:zoom(1);"><img src="'+zoom_images['data'][0].img+'" border="0" width="17" height="18" /><br />'+zoom_images['data'][0].text+'</a>'+'</div>'+'<div class="lupa">'+'<a href="javascript:zoom(-1);"><img src="'+zoom_images['data'][1].img+'" border="0" width="17" height="18" /><br />'+zoom_images['data'][1].text+'</a>'+'</div>'+'<div class="lupa">'+'<a href="javascript:resetZoom();"><img src="'+zoom_images['data'][2].img+'" border="0" width="17" height="18" /><br />'+zoom_images['data'][2].text+'</a>'+'</div>'+'</div>';document.write(zn)};var actShockwave_version=10;var actFlash_version=9;var ShockMode=0;checkShockwave=function(){if(navigator.mimeTypes&&navigator.mimeTypes["application/x-director"]&&navigator.mimeTypes["application/x-director"].enabledPlugin){if(navigator.plugins&&navigator.plugins["Shockwave for Director"]&&(versionIndex=navigator.plugins["Shockwave for Director"].description.indexOf("."))!=-1){var versionString=navigator.plugins["Shockwave for Director"].description.substring(versionIndex-2,versionIndex);versionIndex=parseInt(versionString);if(versionIndex>=actShockwave_version){ShockMode=1}}}else if(navigator.userAgent&&navigator.userAgent.indexOf("MSIE")>=0&&(navigator.userAgent.indexOf("Windows 95")>=0||navigator.userAgent.indexOf("Windows 98")>=0||navigator.userAgent.indexOf("Windows NT")>=0)){document.write('<SCRIPT LANGUAGE=VBScript\> \n');document.write('on error resume next \n');document.write('ShockMode = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.1")))\n');document.write('</SCRIPT\> \n')}if(ShockMode){return true}else if(!(navigator.appName&&navigator.appName.indexOf("Netscape")>=0&&navigator.appVersion.indexOf("2.")>=0)){return false}};var flashinstalled=0;var flashversion=0;MSDetect="false";checkFlash=function(){if(navigator.plugins&&navigator.plugins.length){x=navigator.plugins["Shockwave Flash"];if(x){flashinstalled=2;if(x.description){y=x.description;flashversion=y.charAt(y.indexOf('.')-1)}}else flashinstalled=1;if(navigator.plugins["Shockwave Flash 2.0"]){flashinstalled=2;flashversion=2}}else if(navigator.mimeTypes&&navigator.mimeTypes.length){x=navigator.mimeTypes['application/x-shockwave-flash'];if(x&&x.enabledPlugin)flashinstalled=2;else flashinstalled=1}else MSDetect="true";document.write('<SCRIPT LANGUAGE=VBScript\>\n');document.write('on error resume next \n');document.write('If MSDetect = "true" Then\n');document.write('   For iii = 2 to actFlash_version\n');document.write('      If Not(IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash." & iii))) Then\n');document.write('      \n');document.write('      Else\n');document.write('          flashinstalled = 2\n');document.write('          flashversion = iii\n');document.write('      End If\n');document.write('   Next\n');document.write('End If\n');document.write('If flashinstalled = 0 Then\n');document.write('   flashinstalled = 1\n');document.write('End If\n');document.write('</SCRIPT\> \n');if(flashinstalled!=0&&flashversion>=actFlash_version){return true}return false};checkJava=function(){return navigator.javaEnabled()};var imgCache=new Array();var objCache=new Array();var images_dir='images';var votingURL='vote.php';var cookiePrefix='_vgid';var userCookieName='_uIDtoken';var cookieLifetime=365;var alreadyVoted=false;var token=null;preRenderImgs();function preRenderImgs(){for(i=0;i<=5;i++){imgCache[i]=new Image();imgCache[i].src=images_dir+'/rs_'+(i*10)+'.gif'}};function showRating(note,blue,get){if(note<0){return''}note=Math.ceil(note);if(note<0){note=0}if(note>10){note=10}var note=note/2*10;var image=new Image();if(blue==""||blue==null||blue=="undefined"){image.src=images_dir+'/rs_'+(note)+'.gif'}else{image.src=images_dir+'/rs_'+(note)+'_b.gif'}if(get==""||get==null||get=="undefined"){document.write('<img src="'+image.src+'" border="0" />')}else{return'<img src="'+image.src+'" border="0" />'}};function formvalidCheckElm(){this.formname=new Array;this.field=new Array;this.check=new Array;this.value=new Array;this.error=new Array}var formvalidChecks=new formvalidCheckElm();var formvalidWhitespace=" \t\n\r";function formvalidIsEmpty(s){return((s==null)||(s.length==0))}function formvalidIsWhitespace(s){var i;if(formvalidIsEmpty(s))return true;for(i=0;i<s.length;i++){var c=s.charAt(i);if(formvalidWhitespace.indexOf(c)==-1)return false}return true}function formvalidIsEmail(s){if(!formvalidIsWhitespace(s)){var i=1;var sLength=s.length;while((i<sLength)&&(s.charAt(i)!="@")){i++}if((i>=sLength)||(s.charAt(i)!="@"))return false;else i+=2;while((i<sLength)&&(s.charAt(i)!=".")){i++}if((i>=sLength-1)||(s.charAt(i)!="."))return false;else return true}else return true}function formvalidIsChatnick(s){var i;if(s.length<2||s.length>15)return false;var novalidstart="-0123456789";var validChars="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789{}|[]\\^-_";if((s.length>30)||(s.length<1))return false;if(novalidstart.indexOf(s.charAt(0))!=-1)return false;for(i=1;i<s.length;i++){if(validChars.indexOf(s.charAt(i))==-1)return false}return true}function addcheck(formname,field,check,value,error){var newIndex=formvalidChecks.formname.length;formvalidChecks.formname[newIndex]=formname;formvalidChecks.field[newIndex]=field;formvalidChecks.check[newIndex]=check;formvalidChecks.value[newIndex]=value;formvalidChecks.error[newIndex]=error;if(!document.forms[formname].onsubmit){document.forms[formname].onsubmit=formvalidValidateForm}}function formvalidValidateForm(formname){if(typeof(formname)!='string'){if(typeof(formname)=='object'&&typeof(formname.target)=='object'){formname=formname.target.name}if(typeof(event)=='object'&&typeof(event.srcElement)=='object'){formname=event.srcElement.name}}var numelms=formvalidChecks.formname.length;var cansubmit=true;var errorMsg='';for(var i=0;i<numelms;i++){if(formvalidChecks.formname[i]==formname){switch(document.forms[formname].elements[formvalidChecks.field[i]].type){case'text':fieldvalue=document.forms[formname].elements[formvalidChecks.field[i]].value;break;case'select-one':fieldvalue=document.forms[formname].elements[formvalidChecks.field[i]].options[document.forms[formname].elements[formvalidChecks.field[i]].selectedIndex].value;break;case'select-multiple':fieldvalue='';for(var j=0;j<document.forms[formname].elements[formvalidChecks.field[i]].length;j++){if(document.forms[formname].elements[formvalidChecks.field[i]].options[j].selected==true){fieldvalue=fieldvalue+''+document.forms[formname].elements[formvalidChecks.field[i]].options[j].value}}break;case'file':fieldvalue='';break;case'password':case'textarea':default:fieldvalue=document.forms[formname].elements[formvalidChecks.field[i]].value;break}switch(formvalidChecks.check[i]){case'required':if(formvalidIsWhitespace(fieldvalue)){errorMsg=errorMsg+formvalidChecks.error[i]+'\n\n';cansubmit=false}break;case'required_if_active':if(document.forms[formname].elements[formvalidChecks.value[i]].value!=0&&formvalidIsWhitespace(fieldvalue)){errorMsg=errorMsg+formvalidChecks.error[i]+'\n\n';cansubmit=false}break;case'alphanum':var regex=/^[\w\s]*$/;if(!regex.exec(fieldvalue)){errorMsg=errorMsg+formvalidChecks.error[i]+'\n\n';cansubmit=false}break;case'numeric':var regex=/^[\d\s]*$/;if(!regex.exec(fieldvalue)){errorMsg=errorMsg+formvalidChecks.error[i]+'\n\n';cansubmit=false}break;case'maxlen':if(fieldvalue.length>formvalidChecks.value[i]){errorMsg=errorMsg+formvalidChecks.error[i]+'\n\n';cansubmit=false}break;case'minlen':if(fieldvalue.length<formvalidChecks.value[i]&&!formvalidIsWhitespace(fieldvalue)){errorMsg=errorMsg+formvalidChecks.error[i]+'\n\n';cansubmit=false}break;case'email':if(!formvalidIsEmail(fieldvalue)){errorMsg=errorMsg+formvalidChecks.error[i]+'\n\n';cansubmit=false}break;case'chatnick':if(!formvalidIsChatnick(fieldvalue)){errorMsg=errorMsg+formvalidChecks.error[i]+'\n\n';cansubmit=false}break;case'greater':case'gt':if(!(fieldvalue>formvalidChecks.value[i])){errorMsg=errorMsg+formvalidChecks.error[i]+'\n\n';cansubmit=false}break;case'less':case'lt':if(!(fieldvalue<formvalidChecks.value[i])){errorMsg=errorMsg+formvalidChecks.error[i]+'\n\n';cansubmit=false}break;case'notequal':if(!(fieldvalue!=formvalidChecks.value[i])){errorMsg=errorMsg+formvalidChecks.error[i]+'\n\n';cansubmit=false}break;case'equalto':fieldvaluecompare=document.forms[formname].elements[formvalidChecks.value[i]].value;if(fieldvalue!=fieldvaluecompare){errorMsg=errorMsg+formvalidChecks.error[i]+'\n\n';cansubmit=false}break}}}if(cansubmit==false){alert(errorMsg)}return cansubmit}function getParm(parm){var passed=location.search.substring(1);var startPos=passed.indexOf(parm+"=");if(startPos>-1){startPos=startPos+parm.length+1;var endPos=passed.indexOf("&",startPos);if(endPos==-1)endPos=passed.length;return unescape(passed.substring(startPos,endPos))}return false}