function UE_18mo(){
	var ue18mo_name = "ue18mo",ue18mo_val = "i-am-18";
	var cdo = new UE_CookieDAO();
	
	function $E( id ){return document.getElementById(id);}
	
	function UE_CookieDAO(){
		this.getCookie = function( exit_cookie_name ){
			var cookieStr = document.cookie;
			
			if (cookieStr == ""){
				return; 
			}
	
			var cookieValue = cookieStr.split("; "); 
			
			var startPos = -1;
			var endPos = -1;
			for( var i=0; i < cookieValue.length; i++ ){
				startPos = cookieValue[i].indexOf( exit_cookie_name );
	
				if (startPos != 0){
					continue;
				}
	
				startPos += exit_cookie_name.length + 1;
				endPos = cookieValue[i].length;
				
				var exit_cookie_value = unescape( cookieValue[i].substring( startPos,endPos ) );
				return exit_cookie_value;
			}
			return;
		}
		
		this.setCookie = function( new_cookie_name ,new_cookie_value){
			var the_date = new Date("December 31, 2020");
			var expiresDate = the_date.toGMTString();
			document.cookie = new_cookie_name + "=" + escape( new_cookie_value ) + ";expires=" + expiresDate + ";path=/;"; 
		}
	}
	
	function doCss(){
		var str = '';
		
		str += '<style type="text/css">';
		str += 'body{ position:absolute;width:100%;height:100%;overflow-y:hidden}';
		str += '.isnot18{position:absolute;top:31px;left:0;width:100%;height:100%;background-color:#000;opacity: 0.9;z-index:1000;clear:both;filter: alpha(opacity=90);}';
		str += '.isnot18_cnt{position:absolute; width:980px;top:50px;left:50%; margin-left:-490px;z-index:1001;clear:both; color:#fdfcff; font-variant:small-caps; font-size:15px; line-height:1.7; font-weight:bold; text-align:left;}';
		str += 'h3.title1{ font-size:30px; color:#ff7a32;}';
		str += 'p.p1{ margin:10px 0 20px 0;}';
		str += 'p.p2{color:#ff7a32;font-size:22px; margin-bottom:10px}';
		str += 'a.isnot_btn{ background:url(http://img3.mmo.mmo4arab.com/news/specials/adult/isnot_btn.jpg) no-repeat 0 0; width:170px; height:29px; display:block; line-height:29px; text-align:center;color:#7f3e06;font-size:20px;}';
		str += 'a.isnot_btn:hover{ text-decoration:none;}';
		str += '</style>';
		
		document.write( str );
		
	}
	
	function doDiv(){
		var str = '';
		
		str += '<div class="isnot18" id="isnot18"></div>';
		str += '<div class="isnot18_cnt" id="isnot18_cnt">';
		str += '	<h3 class="title1">You declare that</h3>';
		str += '    <p class="p1">1. You are 18 years of age or older.<br />';
		str += '	2. It is legal for you to read about adult oriented roleplaying and see related pictures. <br />';
		str += '3. You are not offended by reading about a highly politically incorrect form of roleplay involving sexually explicit situation, roleplay of crimes, vampirism, demonism and any other adult fantasy. <br />';
		str += '4. You will leave the special feature or quit reading the page if you encounter any topic that offends you. <br />';
		str += '5. Furthermore, you declare that you have read and understood the Legal Terms And Conditions and that you agree to all of these terms and that all statements made in the terms about visitors of our adult feature are true for you. <br />';
		str += '6. You are not employed in law enforcement acting in any way in connection with your duties or what you see as your responsibilities as law enforcement.</p>';
		str += '	<p class="p2">The above is true for me. Let me in.<a href="#" class="isnot_btn" onclick="ue18mo.cookies_o().setCookie(\'' + ue18mo_name + '\',\'' + ue18mo_val + '\');return false;">Enter</a></p>';
		str += '    <p class="p2">I don\'t wish to enter the feature. Take me elsewhere.<a href="#" class="isnot_btn" onclick="window.location=\'http://news.mmosite.com/\'">Leave</a></p>';
		str += '</div>';
		
		document.write( str );
		
	}
	
	function doSize(){
		$E( "isnot18" ).style.height = document.body.clientHeight + "px";
	}
	
	this.cookies_o = function(){
		$E( "isnot18" ).style.display = "none";
		$E( "isnot18_cnt" ).style.display = "none";
		document.body.style.position = "static";
		document.body.style.overflow = "auto";
                                document.body.style.width = "auto";
		document.body.style.height = "auto";
		return cdo;
	}
	
	this.init = function(){		
		if( cdo.getCookie( "ue18mo" ) == null ){
			doCss();
			doDiv();
			if( document.all && !window.XMLHttpRequest ){
				doSize();
				//window.attachEvent( "onload",function(){doSize( pId );} );
			}
		}
	}
}
var ue18mo = new UE_18mo();


/******************************
 *Filename:      *.js
 *Version:       1.0.0(2009-8-27)
 *Website:       http://
 *Author:        S.S.L
*******************************/

function NewsDisplayForID(){
	
	function doNull( param ){
		return (param == null || param == undefined)? "": param;
	}
	
	
	//MMOsiter Soapbox
		this.mmositerSoapbox = function( arr1,arr2 ){
		
		var str = '';

		str += '	<dl class="forum_right">';
		
		if( arr1 != null ){
			var forum = arr1;
			for( var i = 0; i < forum.length; i++ ){
				str += '  <dd>';
				str += '  <a class="forum_list" href="' + forum[i]['url'] + '" title="' + forum[i]['title'] + '">' + forum[i]['title'] + '</a><br />';
				str += '  Posted ' + forum[i]['date'] + ' by <span class="color_2"><a class="forum_name" href="' + forum[i]['author_url'] + '">' + forum[i]['author_nickname'] + '</a></span><br />';
				str += '<img src="http://img5.mmo.mmo4arab.com/news/specials/adult_v1/comment.gif"/>     ' + forum[i]['reply'] + '   Comments</td>';
				str += '  </dd>';
			}
		}
		
				
		str += '</dl>';
		
		document.write( str );
	}
	

}

var dis_o = new NewsDisplayForID();

/******************************
 *show flalsh
*******************************/

function playFlash(flashid){
	var flink =document.getElementById(flashid).getElementsByTagName("a");
	var fsimag =document.getElementById(flashid).getElementsByTagName("span");
	var ftitle =document.getElementById(flashid).getElementsByTagName("dt");
	var ftext =document.getElementById(flashid).getElementsByTagName("dd");
	var pic_width="622"; 
    var pic_height="268";
	var stop_time=6000;
	var show_text=0; 
	var txtcolor="dddddd";
	var bgcolor="000000";

	var flashUrl = 'http://img3.mmo.mmo4arab.com/news/flash/flash620268.swf';

	var flashvar="";
	for(var i=0; i<flink.length; i++){	
	
		if( i == flink.length - 1){
		flashvar = flashvar +( flink[i].firstChild.src +"#"+ fsimag[i].firstChild.src +"#"+ ftitle[i].firstChild.nodeValue +"#"+ ftext[i].firstChild.nodeValue +"#"+ flink[i].href);
		}else{
		flashvar = flashvar +( flink[i].firstChild.src +"#"+ fsimag[i].firstChild.src +"#"+ ftitle[i].firstChild.nodeValue +"#"+ ftext[i].firstChild.nodeValue +"#"+ flink[i].href  +"|");	
		}
	}
	
	var flash = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="'+ pic_width +'" height="' + pic_height +'" width="'+ pic_width +'" /><param name="allowScriptAccess" value="always" />';
	flash = flash + '<param name="movie" value="'+ flashUrl +'" />';
	flash = flash + '<param name="quality" value="high" />';
	flash = flash + '<param name="menu" value="false" />';
	flash = flash + '<param name="FlashVars" value="mypiclink='+flashvar+'">';
    flash = flash + '<param name="wmode" value="transparent" />';
	flash = flash + '<embed wmode="transparent" src="' + flashUrl + '" FlashVars="mypiclink='+flashvar+'" height="'+ pic_height +'" width="'+ pic_width +'" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"allowScriptAccess="always"  />';
	flash = flash + '</object>';
	document.writeln(flash); 
}



/******************************
 *show forum list 
*******************************/
$.getScript("http://img0.mmo.mmo4arab.com/newforum/genjs/board/gamelistid_9001_5.js", function(){
 	var outHtml = '';
	for(var i=0; i < 5 ; i++){
		outHtml += '<dd>';
		outHtml += '<a class="forum_list" href="'+forumboard_5[i].url+'" title="'+forumboard_5[i].title+'">'+forumboard_5[i].title+'</a><br />';		
		outHtml += ' Posted '+forumboard_5[i]['date']+' by <span class="color_2"><a class="forum_name" href="'+ forumboard_5[i].ownerurl +'">'+forumboard_5[i].nickname+'</a></span><br />';		
		outHtml += '<img src="http://img5.mmo.mmo4arab.com/news/specials/adult_v1/comment.gif"/>     ' + forumboard_5[i]['reply'] + '   Comments';			
		outHtml += '</dd>';
	}
	$("#adult_forumlist").html(outHtml);
});
