/*Example message arrays for the two demo scrollers*/ var pausecontent=new Array() pausecontent[0]='Happy Holidays (Dec 10, 2009) - We hope all of our visitors have a great holiday season!'; pausecontent[1]='KGH Newsletter (Jan 31, 2009) - We\'ve finally sent out the January newsletter and hope all find it useful.'; pausecontent[2]='New Site Design (Dec 1, 2008) - We\'re proud to launch a new KGH design! We hope you all enjoy it :)'; var featuredgame=new Array() featuredgame[0]=["images/featured/acidball.png","/games/acidball/",""]; featuredgame[1]=["images/featured/sushi.png","/games/sushi-go-round/",""]; featuredgame[2]=["images/featured/escape_the_office.png","/games/escape-the-office/",""]; /*featuredgame[1]=["scripts/featured_game.php?src=../images/DEMO-featured-2.gif&p=90&imagetype=gif&backcolor=ffffff&radius=5&title=Presidential%20Paintball&desc=Hillary,%20Obama,%20Giuliani%20and%20more%20play%20paintball%20for%20the%20USA%20Presidency!","#",""];*/ function updateGameSize(id,width,height){ temp_img=new Image(); url="/scripts/update-gamedimentions.php?id="+id+"&height="+height+"&width="+width; temp_img.src=url; } already_rated=false; function rateGame(gameid,rating){ if(!already_rated){ already_rated=true; rate_img=new Image(); url="/scripts/rate-game.php?id="+gameid+"&rating="+rating; rate_img.src=url; document.getElementById("ratetext").innerHTML="Thanks for rating!"; }else{ alert('You have already rated this game.'); } } function updateFriendOrder(f1,f2,f3,f4,f5,f6) { if(f1) f1=f1.replace("user_",""); else f1=""; if(f2) f2=f2.replace("user_",""); else f2=""; if(f3) f3=f3.replace("user_",""); else f3=""; if(f4) f4=f4.replace("user_",""); else f4=""; if(f5) f5=f5.replace("user_",""); else f5=""; if(f6) f6=f6.replace("user_",""); else f6=""; img=new Image(); urltmp="/scripts/update-friendorder.php?f1="+f1+"&f2="+f2+"&f3="+f3+"&f4="+f4+"&f5="+f5+"&f6="+f6+"&nocache="+Math.floor(Math.random() * 100000); img.src=urltmp; img.onload=function(){img="";} img.onerror=function(){img="";} } function deleteFriend(recordid,friendid,friendname){ if(confirm("Are you sure you want to delete "+friendname+" from your friends?")){ imgd=new Image(); urltmp="/scripts/update-deletefriend.php?rid="+recordid+"&fid="+friendid+"&nocache="+Math.floor(Math.random() * 100000); imgd.src=urltmp; imgd.onload=function(){window.location.reload();} imgd.onerror=function(){window.location.reload();} } } function friendReq(rid,action_req,elemid_req){ numoffriendrequests--; if(action_req=="ignore"){ if(!confirm("Are you sure you want to ignore this friend request?")) return; } img=new Image(); urltmp="/scripts/update-acceptfriend.php?rid="+rid+"&action="+action_req+"&nocache="+Math.floor(Math.random() * 100000); img.src=urltmp; img.onload=function(){showNoticeId('action_'+action_req);Effect.Fade(elemid_req);img="";if(numoffriendrequests==0){setTimeout("Effect.Appear('nomore');",1000);}} img.onerror=function(){showNoticeId('action_'+action_req);Effect.Fade(elemid_req);img="";if(numoffriendrequests==0){setTimeout("Effect.Appear('nomore');",1000);}} } function checkElem(val,type){ if(type=="email"){ makeHttpRequest('/scripts/validate_field.php?t=email&v='+val, validateElemScript) } if(type=="username"){ makeHttpRequest('/scripts/validate_field.php?t=username&v='+val, validateElemScript) } if(type=="captcha"){ makeHttpRequest('/scripts/validate_field.php?t=captcha&v='+val, validateElemScript) } } function badElem(elem,message){ //set a variable telling if this is invalid input verifiedElems[elem.id]=false document.getElementById(elem.id+"_notify").innerHTML=" "+message; } function goodElem(elem,message){ //set a variable telling this is valid input verifiedElems[elem.id]=true document.getElementById(elem.id+"_notify").innerHTML=" "+message; } function blankElem(elem){ document.getElementById(elem.id+"_notify").innerHTML=""; }