
	var pr_id='';
	function pr_show(s,t,p1,p2,m){
		var go=true;
		if(statusObj1(s)==''){
			if(m!=null){
				obj=MM_findObj(s+'m')
				if(obj!=null){
					if(obj.innerHTML==m) {
						hideObj1(s);
						go=false;
					}
				}
			}
		}

		if(go==true){
			showObj1(s);
			document.getElementById(s+'t').innerHTML='<center><br>WAIT... LOADING...<br><br><br></center>';
			if(t=='frm'){
				pr_id=s+'t';
				var obj=MM_findObj('prf');
				obj.src='frmpst-preview.php?frm_id='+p1+'&frmpst_id='+p2+'&pr_id='+s;
				if(m!=null){
					obj=MM_findObj(s+'m')
					if(obj!=null){
						obj.innerHTML=m;
					}
				}
			}
		}
	}

	function pr_hide(s){
		pr_id='';
		hideObj1(s);
	}
	function pr_set(s){

		if(pr_id!=''){
			document.getElementById(pr_id).innerHTML=s;
		}
	}

	function si(surl,type,param,width){
		if(type==null) type='data';
		if(width==null) width=300;
		if(type=='user'&&surl=='') surl='/usr-info.php?usr_id='+param;
		if(typeof page_top == 'undefined') page_top=0;
		s=location.href;
		if((top.location.href==s&&page_top==0)||type=='pp'){
			window.open(surl, type, "top=100, left=50,width=750,height=400,resizable=0,scrollbars=1,titlebar=0,menubar=0,location=0,status=0",1);
		} else {
			if(document.all){
				top.frames['bpinfo'].sc(type,surl);
				top.document.all('base2').rows = "5,*,"+width;
			} else if(navigator.userAgent.indexOf("Firefox")>-1){
				top.frames['bpinfo'].sc(type,surl);
				top.document.getElementById('base2').rows = "5,*,"+300;
			} else {
				window.open(surl, 'user', "top=100, left=100,width=650,height=400,resizable=0,scrollbars=1,titlebar=0,menubar=0,location=0,status=0",1);
			}
		}

	};

	function hide_info(){
		if(document.all){
			document.all('base2').rows = "5,*,0";
		} else if(navigator.userAgent.indexOf("Firefox")>-1){
			document.getElementById('base2').rows = "5,*,0"
		} else {
			window.close();
		}

	}


	function addBookmark(title,url) {
		if (window.sidebar) {
			window.sidebar.addPanel(title, url,"");
		} else if( document.all ) {
			window.external.AddFavorite( url, title);
		} else if( window.opera && window.print ) {
			return true;
		}
	}


	function MM_findObj(n, d) {
	  var p,i,x;
	  if(!d) d=document;
	  if((p=n.indexOf("?"))>0&&parent.frames.length) {
	    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);
		}
	  if(!(x=d[n])&&d.all) x=d.all[n];
	  if(!(x=d[n])&&document.getElementById) x=d.getElementById(n);
	  for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
	  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); return x;
	}

	function showObj(objname,d) {
		var obj = MM_findObj(objname,d);
		if (obj !=null)
		{
			if (obj.style)
			{
				obj=obj.style;
			}
			obj.visibility = 'visible';
		}
	}

	function hideObj(objname,d)
	{
		var obj = MM_findObj(objname,d);
		if (obj !=null)
		{
			if (obj.style)
			{
				obj=obj.style;
			}
			obj.visibility = 'hidden';
		}
	}

	function showObj1(objname,d) {
		var obj = MM_findObj(objname,d);
		if (obj !=null)
		{
			if (obj.style)
			{
				obj=obj.style;
			}
			obj.display = '';
		}
	}

	function statusObj1(objname,d) {
		var obj = MM_findObj(objname,d);
		if (obj !=null)
		{
			if (obj.style)
			{
				obj=obj.style;
			}
			var s=obj.display;
			return s;
		}
	}


	function hideObj1(objname,d)
	{
		var obj = MM_findObj(objname,d);
		if (obj !=null)
		{
			if (obj.style)
			{
				obj=obj.style;
			}
			obj.display = 'none';
		}
	}

	function menu_update(d){
		var obj = MM_findObj('menu_update',d);
		if (obj !=null){
			if (obj.style) 	obj=obj.style;
			if(obj.display != '')
				obj.display ='';
			else
				obj.display ='none';
		} else {
			alert('null')
		}

	}

	function get_local_time(){

		var currentTime = new Date()
		var month = currentTime.getMonth() + 1
		var day = currentTime.getDate()
		var year = currentTime.getFullYear()
		var h = currentTime.getHours();
		var m = currentTime.getMinutes();
		var s = currentTime.getSeconds();
		if(s<10) s='0'+s;
		if(m<10) m='0'+m;
		if(h<10) h='0'+h;
		if(day<10) day='0'+day;
		if(month<10) month='0'+month;

		return  year + "-" + month + "-" + day+" "+h+":"+m+":"+s
	}

	function playVideo(sPath){
		var s='',sd='';
		var i=sPath.indexOf('.com');
		if(i>0){
			var sd=sPath.substring(0,i);
			sd=sd.toLowerCase();
		}
		 i=sPath.indexOf('&');
		 if(i>0){
			sPath=sPath.substring(0,i);
		 }
		 
		sPath=sPath.replace(/\(/g,'');
		sPath=sPath.replace(/\)/g,'');
		sPath=sPath.replace(/</g,'');
		sPath=sPath.replace(/>/g,'');
		sPath=sPath.replace(/#/g,'');
		sPath=sPath.replace(/;/g,'');
		
		
		if( sd=='http://www.ifilm'||sd=='http://ifilm'){
			sPath=sPath.replace(/http:\/\/www.ifilm.com\/video\//,'');
			sPath=sPath.replace(/http:\/\/ifilm.com\/video\//,'');
			s='<embed width="448" height="365" src="http://www.ifilm.com/efp" quality="high" bgcolor="000000" name="efp" align="middle" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" flashvars="flvbaseclip='+sPath+'&"> </embed>';
		} else if( sd=='http://www.youtube'||sd=='http://youtube'){
			sPath=sPath.replace(/watch\?v=/,'v/')
			s='<object width="425" height="350"><param name="movie" value="'+sPath+'"></param><param name="wmode" value="transparent"></param><embed src="'+sPath+'" type="application/x-shockwave-flash" wmode="transparent" width="425" height="350"></embed></object>';
		} else if(sd=='http://www.metacafe'||sd=='http://metacafe'){
			sPath=sPath.replace(/\/watch\//,'/fplayer/');
			sPath=sPath.replace(/^\s*|\s*$/g,'');
			sPath=sPath.replace(/\/$/g,'.swf');
			if(sPath.indexOf('.swf')<0) sPath=sPath+'.swf';
			s='<embed src="'+sPath+'" width="400" height="345" wmode="transparent" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"></embed>';
		} else if(sd=='http://www.liveleak'||sd=='http://liveleak'){
			sPath=sPath.replace(/view\?i=/,'player.swf?autostart=false&token=')
			s='<object type="application/x-shockwave-flash" width="450" height="370" wmode="transparent" data="'+sPath+'"><param name="movie" value="'+sPath+'"><param name="wmode" value="transparent"><param name="quality" value="high"></object>';
		} else {
			s='<br>'+sPath;
		}
		document.write(s);
		
	}

	function showPics(sPics){
		var i=0,j=0;
		if (sPics!='') {
			var arr=sPics.split(';');
			for(i=0;i<arr.length;i++){
				j=1*arr[i];
				document.write('<span style="padding:1px"><a href="cmm-glr-list.php?id='+j+'" target="_blank"><img src="/images/objtn/'+j+'.jpg" border=0></a></span>')
			}
		}

	}

