// JavaScript Document
String.prototype.trim=function(){
  var x=this;
  x=x.replace(/^\s*(.*)/,"$1");
  x=x.replace(/(.*?)\s*$/,"$1");
  return x;
}

function play(clip){
	window.open("popups/play.php?clip="+clip,"iPlay","width=450,height=350,status = no ,toolbar = no ,resizable = no");
}

function closeAd(){
	document.getElementById('divBannerWindow').style.display='none'; 	
}

function openWindow(filename,WindowName,w,h,strFeatures) { 		
	var sw=screen.width/2;
	var sh=(screen.height/2)-50;
	window.open(filename,WindowName,'top='+(sh-(h/2))+',left='+(sw-(w/2))+',location=0,status=0,scrollbars=0,width='+w+',height='+h+','+strFeatures+' ');
}

function TdActive(col,chk){
	var var_col=document.getElementById(col); 	
	
	if(chk.checked==true){
		var_col.style.backgroundColor='#F7D776';
	}else{
		var_col.style.backgroundColor='';
	}
}

function MainMenuOnOver(obj){
	obj.style.backgroundColor='#CCCCCC';
	obj.style.color='#000000';
}
function MainMenuOnOut(obj){
	obj.style.backgroundColor='';
	obj.style.color='#FFFFFF';
}
function MainMenuOnClick(url){
	location.href='index.php?u='+url;
}

<!--
var OldColor;
function mOvr(src,clrOver) {
	if (!src.contains(event.fromElement)) {
		src.style.cursor = 'hand';
		OldColor = src.bgColor;
		src.bgColor = clrOver;
	}
}
function mOut(src) {
	if (!src.contains(event.toElement)) {
		src.style.cursor = 'default';
		src.bgColor = OldColor;
	}
}
function mClk(src) {
	if(event.srcElement.tagName=='TR') {
		src.children.tags('A')[0].click();
	}
}
//-->

function CheckBoxAll(){
	var id=document.list.elements;
	var boolValue=document.list.chkAll.checked;
	for (i=0;i<id.length;i++){	
		if(id[i].name=="del[]"){
			id[i].checked=boolValue;
		}
	}
}

function Confirm(msg) {
	if (confirm(msg)) {
		return true;
	}else {
		return false;
	}   
}