































//player.js
//ver 1.0
var Client="joqr"
var apigm = "../aandg"
var RequestInt = 30000;
var Program_name;
var Program_link;
var Program_text;
var Program_personality;
var Program_adimg1;
var Program_adlink1;
var Now_music;
var Now_artist;


function dwwmt(){

	document.write('<OBJECT id="hangame_repeat" width=320 height=284 classid="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95" codebase="https://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,5,715" standby="Loading Microsoft Windows Media Player components..." type="application/x-oleobject" VIEWASTEXT>');
	document.write('<param name="ShowControls" value="true" />');
	document.write('<PARAM name="Volume" value="-700" />');
	document.write('<PARAM name="ShowDisplay" value="false" />');
	document.write('<PARAM name="ShowStatusBar" value="true" />');
	document.write('<PARAM name="ShowAudioControls" value="true" />');
	document.write('<PARAM name="ShowPositionControls" value="false" />');
	document.write('<PARAM name="ShowTracker" value="false" />');
	document.write('<PARAM name="AutoStart" value="true" />');
	document.write('<PARAM name="EnableContextMenu" value="false" />');
	document.write('<PARAM name="FileName" value="ag_movie_ot.php" />');
	document.write('<EMBED');
	document.write(' TYPE="application/x-mplayer2"');
	document.write(' pluginspage="http://www.microsoft.com/Windows/Downloads/Contents/Products/MediaPlayer/"');
	document.write(' width="320"');
	document.write(' height="284"');
	document.write(' showcontrols="1"');
	document.write(' volume="-700"');
	document.write(' showdisplay="0"');
	document.write(' showstatusbar="1"');
	document.write(' showaudiocontrols="1"');
	document.write(' showpositioncontrols="0"');
	document.write(' showtracker="0"');
	document.write(' autostart="1"');
	document.write(' EnableContextMenu="0"');
	document.write(' src="ag_movie_ot.php">');
	document.write('</EMBED>');
	document.write('</OBJECT>');
}


function CKget2(CKkey){
   var CKData;
   CKkey += "=";
   GetCKdata = document.cookie + ";";
   start = GetCKdata.indexOf(CKkey);
   if (start != -1){
      end = GetCKdata.indexOf(";",start);
      CKData = unescape(GetCKdata.substring(start+CKkey.length,end));
      return CKData.split(":");
   }
   return false;
}



function intstart(){
   CoData = CKget2(Client);
   if(CoData){
      maintimer = setInterval('startFile()', 2000) 
   }else{
      location.href = "../form/form4.php"
   }

   
   
}
function startFile(){
	clearTimeout(maintimer);
	requestFile('','GET',apigm,true,on_loaded_2)
	maintimer = setTimeout("startFile()",30000);
}

	function on_loaded_2(oj)
	{
      var res	= oj.responseText 
      eval(res)
      if((!Program_name)&&(!Program_link)&&(!Program_text)&&(!Program_personality)&&(!Program_adimg1)&&(!Program_adlink1)&&(!Now_music)&&(!Now_artist)){
//         location.href = "end.html"
      }else{

         if((Program_link == " ") || (!Program_link)){
            document.getElementById('P_link').innerHTML = '<img src="img/spacer.gif" width="1" height="1">';
         }else{
            document.getElementById('P_link').innerHTML = '<a href="'+Program_link+'" target="_blank"><img src="mvimg/moreinfo.jpg" alt="More Info" border="0"></a>';
         }
         if(Program_name){
            document.getElementById('P_name').innerHTML = decodeURIComponent(Program_name);
         }else{
            document.getElementById('P_name').innerHTML = '';
         }
         if(Program_text){
            document.getElementById('P_text').innerHTML = decodeURIComponent(Program_text);
         }else{
            document.getElementById('P_text').innerHTML = '';
         }
         if(Program_personality){
            document.getElementById('P_personality').innerHTML = decodeURIComponent(Program_personality);
         }else{
            document.getElementById('P_personality').innerHTML = '';
         }
         if(Program_adimg1){
            document.getElementById('P_adimg').innerHTML = '<a href="'+Program_adlink1+'" target="_blank"><img src="'+Program_adimg1+'" border="0"></a>';
         }else{
            document.getElementById('P_adimg').innerHTML = '';
         }
         //document.getElementById('N_music').innerHTML = decodeURIComponent(Now_music);
         //document.getElementById('N_artist').innerHTML = decodeURIComponent(Now_artist);
      }
	}

	function createHttpRequest()
	{
		if(window.ActiveXObject)
		{
			  try 
			  {
			    return new ActiveXObject("Microsoft.XMLHTTP") 
			  } 
			  catch (e2) 
			  {
			      return null
			  }
		} 
		else if(window.XMLHttpRequest)
		{
			return new XMLHttpRequest() 
		} 
		else 
		{
			return null
		}
	}

	function requestFile( data , method , fileName , async ,callback )
	{
		var httpoj = createHttpRequest()	

		httpoj.onreadystatechange = function()	
		{ 
			if ((httpoj.readyState==4) && (httpoj.status==200))
			{ 
				callback(httpoj)
			}
		}
		httpoj.open( method , fileName , async )
		httpoj.setRequestHeader('If-Modified-Since', 'Wed, 15 Nov 1995 00:00:00 GMT');
		httpoj.send( data ) 
	}

function wopen1(url,w,h){
	win=window.open(url,"hangamewindow","width=" + w + ",height=" + h + ",resizable=no,scrollbars=no,menubar=no,toolbar=no,directories=no,status=yes");
}//

function WindowOpens(url,width,height){
win=window.open(url,"window","width=" + width + ",height=" + height +",resizable=yes,scrollbars=yes,menubar=no,toolbar=no,directories=no,status=yes");
}
