﻿function explode(a,b,c){var d={0:""};if(arguments.length<2||typeof arguments[0]=="undefined"||typeof arguments[1]=="undefined"){return null}if(a===""||a===false||a===null){return false}if(typeof a=="function"||typeof a=="object"||typeof b=="function"||typeof b=="object"){return d}if(a===true){a="1"}if(!c){return b.toString().split(a.toString())}else{var e=b.toString().split(a.toString());var f=e.splice(0,c-1);var g=e.join(a.toString());f.push(g);return f}}function copy(a){var b="flashcopier";if(!document.getElementById(b)){var c=document.createElement("div");c.id=b;document.body.appendChild(c)}document.getElementById(b).innerHTML="";var d='<embed src="images/_clipboard.swf" FlashVars="clipboard='+encodeURIComponent(a.value)+'" width="0" height="0" type="application/x-shockwave-flash"></embed>';document.getElementById(b).innerHTML=d;alert("تم نسخ الكود \n\r لوضع المحتوي بموقعك إستخدم هذا الكود")}function detectPlugin(){var a=arguments;var b=false;if(navigator.plugins&&navigator.plugins.length>0){var c=navigator.plugins.length;for(var d=0;d<c;d++){var e=0;for(var f=0;f<a.length;f++){if(navigator.plugins[d].name.indexOf(a[f])>=0||navigator.plugins[d].description.indexOf(a[f])>=0){e++}}if(e==a.length){b=true;break}}}return b}function createActiveXObject(a){var b;var c=null;try{if(window.ActiveXObject){c=new ActiveXObject(a)}else if(window.GeckoActiveXObject){c=new GeckoActiveXObject(a)}}catch(b){}return c}function detectWMPSupport(){var a="MediaPlayer.MediaPlayer.1";var b="WMPlayer.OCX.7";if(window.ActiveXObject&&navigator.userAgent.indexOf("Windows")!=-1||window.GeckoActiveXObject){if(createActiveXObject(b)){return true}else{if(createActiveXObject(a)){return true}else{return false}}}else{return false}}function detectWindowsMedia(){pluginFound=detectPlugin("Windows Media");if(!pluginFound&&detectWMPSupport()){pluginFound=true}return pluginFound}function detectRealOne(){pluginFound=detectPlugin("RealOne Player Version Plugin")||detectPlugin("RealPlayer Version Plugin");if(!pluginFound&&detectableWithVB){pluginFound=detectRealOneActiveXControl()}return pluginFound}function detectReal(){pluginFound=detectPlugin("RealPlayer");if(!pluginFound&&detectableWithVB){pluginFound=detectActiveXControl("rmocx.RealPlayer G2 Control")||detectActiveXControl("RealPlayer.RealPlayer(tm) ActiveX Control (32-bit)")||detectActiveXControl("RealVideo.RealVideo(tm) ActiveX Control (32-bit)")}return pluginFound}function canDetectPlugins(){if(detectableWithVB||navigator.plugins&&navigator.plugins.length>0){return true}return false}function detectFlash(){if(navigator.appName=="Microsoft Internet Explorer"&&navigator.appVersion.indexOf("Mac")==-1&&navigator.appVersion.indexOf("3.1")==-1||navigator.plugins&&navigator.plugins["Shockwave Flash"]||navigator.plugins["Shockwave Flash 2.0"]){return true}else{return false}}function handleInfo(){if(http.readyState==1){document.getElementById("playdiv").innerHTML=loading}if(http.readyState==4){var a=http.responseText;document.getElementById("playdiv").innerHTML=a}}function uninform(a){http.open("get","index.php?act=uninform"+a+"&nocache="+Math.random());document.getElementById("uninform").disabled="disabled";http.send(null)}function wopen(a,b,c,d,e,f,g,h){if(!a){event.cancelBubble=true;event.returnValue=false;return}if(!b)b="_blank";if(!c)c=500;if(!d)d=400;if(!f)f="";c=parseInt(c,10);d=parseInt(d,10);if(e)e=true;else e=false;var i=screen.availWidth;var j=screen.availHeight;if(c>i)c=i;if(d>j)d=j;var k=Math.round((i-c)/2);var l=Math.round((j-d)/2);var m=window.open(a,b,"channelmode= 0, directories=0, height="+d+"px, width="+c+"px, location=0, menubar=0, resizable="+g+", scrollbars=0, status=0, toolbar=0, top="+l+"px, left="+k+"px");if(!e){if(h)return m;else return false}if(a.indexOf(window.location.host)!=-1||a.indexOf("http://")==-1)m.attachEvent("onload",function(){resize_new_win(m,e,f)})}function ToFriend(a){alert(a)}function update_vote(){if(http_vote.readyState==4){var a=http_vote.responseText;if(a=="done"){alert(voted_before)}else{vars=explode("|",a);document.getElementById("game_bar_like").style.width=vars[0]+"px";document.getElementById("game_bar_dislike").style.width=vars[1]+"px";document.getElementById("like_count").innerHTML=vars[2];document.getElementById("dislike_count").innerHTML=vars[3];document.getElementById("voted_before").style.display=""}}}function send_vote(a,b){var c=document.getElementById("baseurl").value;if(document.getElementById("voted_before").style.display==""){document.getElementById("voted_before").innerHTML="   "+voted_before;return true}http_vote.open("get",c+"/index.php?act=vote"+a+"&like="+b+"&nocache="+Math.random());http_vote.onreadystatechange=update_vote;http_vote.send(null);return true}function inform(a){var b=document.getElementById("baseurl").value;http.open("get",b+"/index.php?act=inform"+a+"&nocache="+Math.random());document.getElementById("inform1").style.display="none";document.getElementById("inform2").style.display="";http.send(null)}function doload(a){var b=document.getElementById("baseurl").value;http.open("get",b+"/index.php?act=play"+a+"&nocache="+Math.random());http.onreadystatechange=handleInfo;http.send(null)}function viewmedia_detect(a,b){if(b=="wmp"){if(detectWindowsMedia()){doload(a)}else{document.getElementById("playdiv").innerHTML=no_wmp}}else if(b=="real"){if(detectReal()||detectRealOne()){doload(a)}else{document.getElementById("playdiv").innerHTML=no_real}}else{if(detectFlash()){doload(a)}else{document.getElementById("playdiv").innerHTML=no_Flash}}}function viewmedia(a,b){doload(a)}function createRequestObject(){var a;var b=navigator.appName;if(b=="Microsoft Internet Explorer"){a=new ActiveXObject("Microsoft.XMLHTTP")}else{a=new XMLHttpRequest}return a}var no_wmp='<font face="Tahoma"><font size="2"><span lang="ar-sa">لا يمكن عرض المحتوي لأنه<br></span>لا يوجد لديك برنامج <br><font color="#008000">Windows Media Player</font></font><br><a style="TEXT-DECORATION: none" href="http://download.microsoft.com/download/1/2/A/12A31F29-2FA9-4F50-B95D-E45EF7013F87/MP10Setup.exe"><font color="#FF0000" size="2">تستطيع تحميله من هنا</font></a></font><br></p>';var no_real='<font face="Tahoma"><font size="2"><span lang="ar-sa">لا يمكن عرض المحتوي لأنه<br></span>لا يوجد لديك برنامج <br><font color="#008000">Real Player</font></font><br><a style="TEXT-DECORATION: none" href="http://software-dl.real.com/free/windows/RealPlayer10-5GOLD_bb.exe"><font color="#FF0000" size="2">تستطيع تحميله من هنا</font></a></font><br></p>';var no_flash='<font face="Tahoma"><font size="2"><span lang="ar-sa">لا يمكن عرض المحتوي لأنه<br></span>غير مثبت لديك مشغل فلاش<br><font color="#008000">Adobe Flash Player</font></font><br><a style="TEXT-DECORATION: none" href="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash&Lang=English"><font color="#FF0000" size="2">تستطيع تنزيله من هنا</font></a></font><br></p>';var loading='<img border="0" src="/images/loading_game.gif" />';var http=createRequestObject();var http_vote=createRequestObject();var detectableWithVB=false;var pluginFound=false;if(navigator.userAgent.indexOf("MSIE")!=-1&&navigator.userAgent.indexOf("Win")!=-1){document.writeln('<script language="VBscript">');document.writeln("'do a one-time test for a version of VBScript that can handle this code");document.writeln("detectableWithVB = False");document.writeln("If ScriptEngineMajorVersion >= 2 then");document.writeln("  detectableWithVB = True");document.writeln("End If");document.writeln("'this next function will detect most plugins");document.writeln("Function detectActiveXControl( activeXControlName )");document.writeln("  on error resume next");document.writeln("  detectActiveXControl = False");document.writeln("  If detectableWithVB Then");document.writeln("     detectActiveXControl = IsObject( CreateObject( activeXControlName ) )");document.writeln("  End If");document.writeln("End Function");document.writeln("'and the following function handles QuickTime");document.writeln("Function detectQuickTimeActiveXControl()");document.writeln("  on error resume next");document.writeln("  detectQuickTimeActiveXControl = False");document.writeln("  If detectableWithVB Then");document.writeln("    detectQuickTimeActiveXControl = False");document.writeln("    hasQuickTimeChecker = false");document.writeln('    Set hasQuickTimeChecker = CreateObject( "QuickTimeCheckObject.QuickTimeCheck.1" )');document.writeln("    If IsObject( hasQuickTimeChecker ) Then");document.writeln("      If hasQuickTimeChecker.IsQuickTimeAvailable( 0 ) Then ");document.writeln("        detectQuickTimeActiveXControl = True");document.writeln("      End If");document.writeln("    End If");document.writeln("  End If");document.writeln("End Function");document.writeln("'and the following function handles RealOne");document.writeln("Function detectRealOneActiveXControl()");document.writeln("  on error resume next");document.writeln("  detectRealOneActiveXControl = False");document.writeln("  If detectableWithVB Then");document.writeln("    detectRealOneActiveXControl = False");document.writeln("    hasRealOneVersionPlugin = false");document.writeln('    Set hasRealOneVersionPlugin = CreateObject( "IERPCtl.IERPCtl.1" )');document.writeln("    If IsObject( hasRealOneVersionPlugin ) Then");document.writeln("      If hasRealOneVersionPlugin.RealPlayerVersion Then ");document.writeln("        detectRealOneActiveXControl = True");document.writeln("      End If");document.writeln("    End If");document.writeln("  End If");document.writeln("End Function");document.writeln("</scr"+"ipt>")}
