function fixPNG(element){ if (/MSIE (5\.5|6).+Win/.test(navigator.userAgent)){ var src; if((element.tagName=='IMG') && (element.src!='')){ if (/\.png$/.test(element.src)){ src = element.src; element.src = "http://games.quickandsimple.com/js/blank.gif"; } }else{ src = element.currentStyle.backgroundImage.match(/url\("(.+\.png)"\)/i) if (src){ src = src[1]; element.runtimeStyle.backgroundImage="none"; } } if (src) element.runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + src + "',sizingMethod='scale')"; } } function RefreshPage(){ document.location.href = document.location.href; } function GetFlashObj(objName){ if (navigator.appName.indexOf ("Microsoft") != -1) { return document.getElementById(objName); } else { return document[objName]; } } function GetFormObj(objName){ if (window.navigator.appName.toLowerCase().indexOf("microsoft") > -1) return document.getElementById(objName) else return document.forms[objName]; } function AZ(text){ var ret = ''; for(var i=0;i=65 && code <= 90) ret += s; //A-Z if (code >=97 && code <= 122) ret += s; //a-z if (code >=48 && code <= 57) ret += s; //0-9 } return ret; } function RunGame(name, width, height){ width += 30; if (width < 770) width = 770; height += 280; var url = 'http://games.quickandsimple.com/games/' + name + '/playgame.aspx'; var wnd = window.open(url, AZ(name), 'width=' + width + 'px,height=' + height + 'px,status=0,resizable=0,location=0,scrollbars=0'); if (wnd) wnd.focus(); } function PopularGames(gameName, pageName){ var bgStyle = 'background:url(http://games.quickandsimple.com/games/' + pageName + '/small_logo.png) no-repeat;width:211px;height:165px;'; var sWrite = '
'; sWrite += '
'; sWrite += '
Play to ' + gameName + '
'; sWrite += '
'; sWrite += '
'; document.write(sWrite); } function MainAllGames(gameName, pageName){ var sWrite = '
' + gameName + '
'; document.write(sWrite); } function AllGames(gameName, pageName){ var sWrite = '
' + gameName + '
'; document.write(sWrite); } function GLeader(position, screenName, score, treatsTotal, isCurrentUser, profileUrl){ var className = 'leaderName'; var classText = 'scoreText'; var lnkStyle = 'lnkScreenName'; if (isCurrentUser==1) { className = 'leaderNameSelf'; classText = 'scoreTextSelf' lnkStyle = 'lnkScreenNameSelf'; } var starRank = 1; var starAlt = 'Points Score is 0 to 9,999'; if (treatsTotal>=10000) {starRank = 2; starAlt = 'Points Score is 10,000 to 99,999';} if (treatsTotal>=100000) {starRank = 3; starAlt = 'Points Score is 100,000 to 499,999';} if (treatsTotal>=500000) {starRank = 4; starAlt = 'Points Score is 500,000 to 999,999';} if (treatsTotal>=1000000) {starRank = 5; starAlt = 'Points Score is 1,000,000 to more';} var sWrite = ''; sWrite += ''; sWrite += '
' + position + ')' + score + '
'; document.write(sWrite); } function ViewGameLB(position, screenName, score, isCurrentUser){ var style = ''; if (isCurrentUser == 1) style = ' style="color:red"'; var sWrite = ''; sWrite += ''; sWrite += '
' + position + ')
'; sWrite += '
' + screenName + '
' + score + '
'; document.write(sWrite); }