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.cosmogirl.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){ if (width < 854) width = 854; height += 209; var url = 'http://games.cosmogirl.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 PopularGames1(gameName, gameDesc, pageName){ var sWrite = '
' sWrite += '
'; sWrite += '
'; sWrite += ''; sWrite += ''; sWrite += ''; sWrite += '
'; sWrite += '
' + gameName + '
'; sWrite += '
' + gameDesc + '
'; sWrite += ''; sWrite += '
' + gameName + '
'; sWrite += '
'; sWrite += '
'; sWrite += '
'; document.write(sWrite); } function PopularGames(gameName, gameDesc, pageName){ var sWrite = '
'; sWrite += '
'; sWrite += ''; sWrite += ''; sWrite += ''; sWrite += '
'; sWrite += '
'; sWrite += ''; sWrite += '
' + gameDesc + '
'; sWrite += '
'; sWrite += ''; sWrite += '
' + 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 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); }