function displayFlash(src, width, height) {
	document.write('<object id="mov" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://active.macromedia.com/flash2/cabs/swflash.cab#version=4,0,0,0" width="' + width + '" height="' + height + '">');
	document.write('<param name="movie" value="' + src + '"><param name="quality" value="high"><PARAM NAME="scale" VALUE="exactfit"><PARAM NAME="menu" VALUE="true">');
	document.write('<param name="wmode" value="transparent">');
	document.write('<embed name="mov" src="' + src +  '" width="' + width + '" height="' + height + '" quality="high" swLiveConnect="false" scale="exactfit" menu="true" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash">');
	document.write('</embed>');
	document.write('</object>');
}

function displayDirector(src, width, height) {
	document.write('<object id="mov" classid="clsid:166B1BCA-3F9C-11CF-8075-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/director/sw.cab#version=7,0,2,0" width="' + width + '" height="' + height + '">');
	document.write('<param name="swRemote" value="swSaveEnabled=\'true\' swVolume=\'true\' swRestart=\'true\' swPausePlay=\'true\' swFastForward=\'true\' swContextMenu=\'true\'">');
	document.write('<param name="swStretchStyle" value="meet">');
	document.write('<param name="bgColor" value="#000000">');
	document.write('<param name="src" value="' + src + '">');
	document.write('<embed name="mov" src="' + src + '" width="' + width + '" height="' + height + '" bgColor="#000000" swRemote="swSaveEnabled=\'true\' swVolume=\'true\' swRestart=\'true\' swPausePlay=\'true\' swFastForward=\'true\' swContextMenu=\'true\'" swStretchStyle="meet" type="application/x-director" pluginspage="http://www.macromedia.com/shockwave/download/"></embed>');
	document.write('</object>');
}

function displayIFrame(src, width, height) {
	document.write('');
}




function gamevote(idno,vote){    
var sc = "id="+idno+"&vote="+vote;
          JXG(1, "ratingno", "/vote.php", sc); 
      }

function AJAX() {
   var ajax = false;
   
   // Internet Explorer (5.0+)
   try {
     ajax = new ActiveXObject("Msxml2.XMLHTTP"); 
   } catch (e) {
	   
      try {
        ajax = new ActiveXObject("Microsoft.XMLHTTP");
      } catch (e) {
        ajax = false;
      }

   }

   // Mozilla Safari
   if ( !ajax && typeof XMLHttpRequest != 'undefined' ) {
	   
     try{
        ajax = new XMLHttpRequest();
     }catch(e) {    
        ajax = false;
     }

   }

   // (IceBrowser)
   if ( !ajax && window.createRequest ) {
     
	 try{
        ajax = window.createRequest();
     }catch(e) {  
        ajax = false;
     }

   }

	return ajax;
}


// POST
function JXP(yukleniyor, yer, dosya, sc) {
	ajax = new AJAX();
	
	if ( ajax ) {
		ajax.onreadystatechange = function () {}
		ajax.abort()
	}

    ajax.onreadystatechange = function () {	Loading(yukleniyor, yer) }
	
	ajax.open('POST', dosya, true)
	ajax.setRequestHeader("If-Modified-Since", "Sat, 1 Jan 2000 00:00:00 GMT")
	ajax.setRequestHeader('Content-Type','application/x-www-form-urlencoded; charset=UTF-8')
    ajax.setRequestHeader("Content-length", sc.length)
    ajax.setRequestHeader("Connection", "close")
	ajax.send(sc)		
}


// GET
function JXG(yukleniyor, yer, dosya, sc) {
	ajax = new AJAX();
	
	if ( ajax ) {
		ajax.onreadystatechange = function () {};
		ajax.abort();
	}

	if(sc) {
		dosya = dosya +'?'+ sc;
	}

    ajax.onreadystatechange = function () {	Loading(yukleniyor, yer); }
	
	ajax.open('GET', dosya, true);
	ajax.setRequestHeader("If-Modified-Since", "Sat, 1 Jan 2000 00:00:00 GMT");
	ajax.setRequestHeader("Connection", "close");
	ajax.send(null);	
}


// Loading
function Loading(yukleniyor, yer) {
	if( yukleniyor == 1 && yer != 'no_id' ) {
		if( ajax.readyState == 1 || ajax.readyState == 2 || ajax.readyState == 3 ) {
			var loading = 'Loading ...'
			document.getElementById(yer).innerHTML = loading;
		}
	}

	if( ajax.readyState == 4 && yer != 'no_id' ) {
		if (ajax.status == 200) {
            document.getElementById(yer).innerHTML = ajax.responseText;
        } else {
            document.getElementById(yer).innerHTML = '<strong>Error:</strong> ' + ajax.statusText;
        }
		function AJAX() {};
    }
}


// ( Fix Character )
function fc_(text) {
	var temp;
	
	temp = encodeURIComponent(text);
	
	return temp;
}
