/**

var isIE = (navigator.userAgent.indexOf('MSIE') != -1);
if (window.parent!=window)
 { 
  alert('Trang web ban dang vao khong phai la website chinh thuc cua Bao The Thao TPHCM. The Thao HCM khong chiu trach nhiem ve tinh chinh xac cua thong tin cung do an toan cua trang web nay.\r\nVui long nhan OK de quay lai trang chinh thuc www.thethaohcm.com.vn');
  window.open(location.href, '_top', '');
 }
-*

<!-- 
/**
 * Dung de chech hay uncheck box trong khi xoa du lieu
 (http://www.smartwebby.com/dhtml/)
 */

var form='xoatatca' //Give the form name here

function SetChecked(val,chkName) 
{
dml=document.forms[form];
len = dml.elements.length;
var i=0;
for( i=0 ; i<len ; i++) 
	{
		if (dml.elements[i].name==chkName) 
		{
		dml.elements[i].checked=val;
		}
	}
}

function checkform() // check form nhap vao 
{
	var topic=document.getElementById('topic').value;
	var mucdang=document.getElementById('mucdang').value;
    //alert("asdasdas");
if (topic=="")
	{
	var mess="Bạn chưa nhập ◄◄◄◄◄◄◄[ CHỦ ĐỀ ]►►►►►►►" + "\n";
	mess =mess + " Xin mời nhập lại  ↑↑↑↑↑↑↑↑↑";
	alert(mess);
	var topic2=document.getElementById('topic');
	topic2.focus();
	return false;
	}
if (mucdang=="0")
	{
	var mess="Bạn chưa chọn ◄◄◄◄◄◄◄[ MỤC ĐĂNG ]►►►►►►►" + "\n";
	mess =mess + " Xin mời nhập lại  ↑↑↑↑↑↑↑↑↑";
	alert(mess);
	var mucdang2=document.getElementById('mucdang');
	mucdang2.focus();
	return false;
	}
return true;
}

function ValidateForm(dml,chkName)
{
len = dml.elements.length;
var i=0;
for( i=0 ; i<len ; i++) 
{
	if ((dml.elements[i].name==chkName) && (dml.elements[i].checked==1)) return true
}
alert("Xin hãy chọn ít nhất 1 dòng để xóa")
return false;
}
// het check uncheck-->


function bookmark_us(url, title){

if (window.sidebar) // firefox
    window.sidebar.addPanel(title, url, "");
else if(window.opera && window.print){ // opera
    var elem = document.createElement('a');
    elem.setAttribute('href',url);
    elem.setAttribute('title',title);
    elem.setAttribute('rel','sidebar');
    elem.click();
} 
else if(document.all)// ie
    window.external.AddFavorite(url, title);
}


function confirmSubmit()
{
var agree=confirm("Bạn có muốn tiếp tục không ?");
if (agree)
	return true ;
else
	return false ;
}


// JavaScript Document
function winpopup(urlx,param,twidth,theight)
{
	var strurl= urlx + '?param=' + param;
	var tposx= (screen.width- twidth)/2
	var tposy= (screen.height- theight)/2;

	var newWin=window.open(strurl,"moi","toolbar=no,width="+ twidth+",height="+ theight+ ",directories=no,status=no,scrollbars=yes,resizable=no, menubar=no")
	newWin.moveTo(tposx,tposy);
	newWin.focus();
}

// JavaScript Document
function winpopup2(urlx,twidth,theight)
{
	var strurl= urlx;
	var tposx= (screen.width- twidth)/2
	var tposy= (screen.height- theight)/2;

	var newWin=window.open(strurl,"moi","toolbar=no,width="+ twidth+",height="+ theight+ ",directories=no,status=no,scrollbars=yes,resizable=no, menubar=no")
	newWin.moveTo(tposx,tposy);
	newWin.focus();
}

function writeTime(s) /* xuat hien ngay gio viet*/
{
	var mydate;
	if (s)
		mydate = new Date(s);
	else
		mydate = new Date();
	
	var year = mydate.getYear()
	if (year < 1000)
		year += 1900
	var month = mydate.getMonth() + 1
	if (month < 10)
		month = "0" + month
	var day = mydate.getDate()
	if (day < 10)
		day = "0" + day

	var dayw = mydate.getDay()
	
	var hour = mydate.getHours()
	if (hour < 10)
		hour = "0" + hour
	
	var minute=mydate.getMinutes()
	if (minute < 10)
		minute = "0" + minute
	var dayarray=new Array("Ch&#7911; Nh&#7853;t","Th&#7913; Hai","Th&#7913; Ba","Th&#7913; T&#432;","Th&#7913; N&#259;m","Th&#7913; S&#225;u","Th&#7913; B&#7843;y")
	document.write(dayarray[dayw]+", "+day+"/"+month+"/"+year+",&nbsp;"+hour+":"+minute + " GMT+7")
}



// Loading "dang tai noi dung"
var t_id = setInterval(animate,20);
var pos=1;
var dir=2;
var len=0;
function animate()
{
	var elem = document.getElementById('progress');
	if(elem != null) {
		if (pos==1) len += dir;
		if (len>32 || pos>78) pos += dir;
		if (pos>78) len -= dir;
		if (pos>78 && len==0) pos=1;
		elem.style.left = pos;
		elem.style.width = len;
	}
}
function remove_loading() {
	this.clearInterval(t_id);
	var targelem = document.getElementById('loader_container');
	targelem.style.display='none';
	targelem.style.visibility='hidden';
}



<!-- dua vao trong body onLoad="blinkBlink('searchall')"  
/* This script and many more are available free online at
The JavaScript Source :: http://javascript.internet.com
Created by: Ben Kanaev :: http://www.webhostreview.biz */

function blinkExecute(target,color){
  document.getElementById(target).style.backgroundColor = color;
}

function blinkBlink (target){
  color1 = "#feff6f"; // blinking color
  color2 = "#ffffff"; // background color

  setTimeout('blinkExecute("'+target+'","'+color1+'")',0);
  setTimeout('blinkExecute("'+target+'","'+color2+'")',500);
  setTimeout('blinkExecute("'+target+'","'+color1+'")',1000);
  setTimeout('blinkExecute("'+target+'","'+color2+'")',1500);             
  setTimeout('blinkExecute("'+target+'","'+color1+'")',2000);
  setTimeout('blinkExecute("'+target+'","'+color2+'")',2500);     
  setTimeout('blinkExecute("'+target+'","'+color1+'")',3000);
  setTimeout('blinkExecute("'+target+'","'+color2+'")',3500);     
  setTimeout('blinkExecute("'+target+'","'+color1+'")',4000);
  setTimeout('blinkExecute("'+target+'","'+color2+'")',4500);             
  document.getElementById(target).focus();
}
//-->



// Quang cao chay doc 2 ben suon


// HET -->

function About()
{
	alert("mailto:" + "info" + "@" + "swc.com.vn");
}



function copy(text2copy) {
  if (window.clipboardData) {
	window.clipboardData.setData("Text",text2copy);
  } else {
	var flashcopier = 'flashcopier';
	if(!document.getElementById(flashcopier)) {
	  var divholder = document.createElement('div');
	  divholder.id = flashcopier;
	  document.body.appendChild(divholder);
	}
	document.getElementById(flashcopier).innerHTML = '';
	var divinfo = '<embed src="clipboard.swf" FlashVars="clipboard='+escape(text2copy)+'" width="0" height="0" type="application/x-shockwave-flash"></embed>';
	document.getElementById(flashcopier).innerHTML = divinfo;
  }
  alert("Đã copy vào clipboard\nBạn chỉ việc Ctrl+V");
}



function openImageNews(vLink, vHeight, vWidth) // Mo mot hinh moi bang mot cua so khac va xuat hien dong "close"
//cach dung: them vao trong the IMG onClick="return openImageNews(this.src,500,500)"
{
	var sLink = (typeof(vLink.href)=='undefined') ? vLink : vLink.href;

	if (sLink=='')
	{
		return false;
	}

	winDef = 'status=no,resizable=no,scrollbars=no,toolbar=no,location=no,fullscreen=no,titlebar=yes,height='.concat(vHeight).concat(',').concat('width=').concat(vWidth).concat(',');
	winDef = winDef.concat('top=').concat((screen.height - vHeight)/2).concat(',');
	winDef = winDef.concat('left=').concat((screen.width - vWidth)/2);
	newwin = open('', '_blank', winDef);

	newwin.document.writeln('<title>Chi tiết hình ảnh!</title><body topmargin="0" leftmargin="0" marginheight="0" marginwidth="0">');
	newwin.document.writeln('<center><a href="" onClick="window.close(); return false;"><img src="', sLink, '" alt="', 'Đóng lại', '" border=1 , width="vWidth"><br>Click to Close ! </br></a></center>');
	newwin.document.writeln('</body>');

	if (typeof(vLink.href) != 'undefined')
	{
		return false;
	}
}






/*Dung de hide hoac show mot element nao minh muon
by Leo Charre & Jesse Fergusson
Internet Connection  2004 2005 



Usage:

place this in your HEAD tags:

	<script language="JavaScript" src="/WHEREINPATH/collapse_expand_single_item.js"></script>

Place this in your HTML

	<img src="/IMAGESDIR/u.gif" name="imgfirst" width="9" height="9" border="0" >
	<a  href="#first" onClick="shoh('first');" >Customer Support</a>

	<div style="display: none;" id="first" >
			
			With its friendly solutions-oriented 
			approach, our timely and knowledgeable Technical Support Staff are 
			completely at your disposal. Our Support Technicians are highly 
			trained on the inner workings of the Internet and its associated 
			technologies. Combined with effective troubleshooting techniques, 
			we can quickly identify and resolve technical issues whether they 
			are on our end or on the client end. 		      
	
	</div>


WHEREINPATH is where you are storing this script on your account
IMAGESDIR is where on your acoount you are storing the icons for (expanded collapsed)

*/

imgout=new Image(9,9);
imgin=new Image(9,9);

/////////////////BEGIN USER EDITABLE///////////////////////////////
	imgout.src="gfx/plus.png"; // day la noi chua hinh anh cua button khi ta chua click
	imgin.src="gfx/minus.png";// day la noi chua hinh anh cua button khi ta da click
///////////////END USER EDITABLE///////////////////////////////////

//this switches expand collapse icons
function filter(imagename,objectsrc){
	if (document.images){
		document.images[imagename].src=eval(objectsrc+".src");
	}
}

//show OR hide funtion depends on if element is shown or hidden
function shoh(id) { 
	
	if (document.getElementById) { // DOM3 = IE5, NS6
		if (document.getElementById(id).style.display == "none"){
			document.getElementById(id).style.display = 'block';
			filter(("img"+id),'imgin');			
		} else {
			filter(("img"+id),'imgout');
			document.getElementById(id).style.display = 'none';			
		}	
	} else { 
		if (document.layers) {	
			if (document.id.display == "none"){
				document.id.display = 'block';
				filter(("img"+id),'imgin');
			} else {
				filter(("img"+id),'imgout');	
				document.id.display = 'none';
			}
		} else {
			if (document.all.id.style.visibility == "none"){
				document.all.id.style.display = 'block';
			} else {
				filter(("img"+id),'imgout');
				document.all.id.style.display = 'none';
			}
		}
	}
}
