var arr = null;
function PM_Hide1(iddd){var div1 = document.getElementById(iddd);div1.style.display = 'none';}
function PM_Show1(iddiv){if(arr!=null)document.getElementById(arr).style.display = 'none';arr = iddiv;var div_ = document.getElementById(iddiv);div_.style.display = 'block';}
function sub(a,b){document.getElementById(b).value=a;}
function SSFlash(_1,vi,ii,d){if(arr!=null)document.getElementById(arr).style.display = 'none';arr = d;document.getElementById(_1).innerHTML=AC_RunFlContentX("movie", "http://play.md/embed/playmd.swf", "wmode", "transparent", "quality", "high", "src", "http://play.md/embed/playmd.swf", "FlashVars", "videoid="+vi+"&appurl=http://play.md/", "width", "400", "height", "310", "name", ""+ii+"", "id", ""+ii+"" );}
function HFlash(a,b){document.getElementById(a).innerHTML='';document.getElementById(b).style.display='none';arr=null;}
var offsetfrommouse=[15,25];
var displayduration=0;
var defaultimageheight=40;
var defaultimagewidth=40;
var divIdGlob;
function truebody(){return (!window.opera && document.compatMode && document.compatMode!="BackCompat")?document.documentElement:document.body}
function followmouse(e){
        var xcoord=offsetfrommouse[0];var ycoord=offsetfrommouse[1];
        var docwidth=document.all?truebody().scrollLeft+truebody().clientWidth:pageXOffset+window.innerWidth-15;
        var docheight=document.all?Math.min(truebody().scrollHeight,truebody().clientHeight):Math.min(window.innerHeight);
        if (typeof e!="undefined"){
                if(docwidth-e.pageX<defaultimagewidth+2*offsetfrommouse[0]){xcoord=e.pageX-xcoord-defaultimagewidth;}else{xcoord+=e.pageX;}
                if(docheight-e.pageY<defaultimageheight+2*offsetfrommouse[1]){ycoord+=e.pageY-Math.max(0,(2*offsetfrommouse[1]+defaultimageheight+e.pageY-docheight-truebody().scrollTop));}else{ycoord+=e.pageY;}
        } else if(typeof window.event!="undefined"){
                if(docwidth-event.clientX<defaultimagewidth+2*offsetfrommouse[0]){xcoord=event.clientX+truebody().scrollLeft-xcoord-defaultimagewidth;}else{xcoord+=truebody().scrollLeft+event.clientX}
                if(docheight-event.clientY<(defaultimageheight+2*offsetfrommouse[1])){ycoord+=event.clientY+truebody().scrollTop-Math.max(0,(2*offsetfrommouse[1]+defaultimageheight+event.clientY-docheight));}else{ycoord+=truebody().scrollTop+event.clientY;}
        }
        var myDiv=document.getElementById(divIdGlob);myDiv.style.left=xcoord+"px";myDiv.style.top=ycoord+"px";
}
function s_d(is,dId,e)
{
    divIdGlob=dId;
    var docwidth=document.all? truebody().scrollLeft+truebody().clientWidth:pageXOffset+window.innerWidth-offsetfrommouse[0];
    var docheight=document.all? Math.min(truebody().scrollHeight, truebody().clientHeight):Math.min(window.innerHeight)
    if((navigator.userAgent.indexOf("Konqueror")==-1||navigator.userAgent.indexOf("Firefox")!=-1||(navigator.userAgent.indexOf("Opera")==-1&&navigator.appVersion.indexOf("MSIE")!=-1))&&(docwidth>650&&docheight>500))
    {
        divIdGlob=dId;
        document.onmousemove=followmouse;
        var d=document.getElementById(dId);
        d.style.display='block';
        //d.style.border='1px solid #666666';
        d.innerHTML='<img src="'+is+'" border="0" alt="" />';
    }
}
function h_d(a){divIdGlob=a;var myDiv=document.getElementById(a);myDiv.style.display="none";document.onmousemove="";myDiv.left="-500px";}

function $(i){return document.getElementById(i);}
var h,a,im,x,y,connt;
function Smes(){$(h).value=$('msgtxt').value;__doPostBack(h,a);}
function ShowPM(p,c,_x,_y,i,t,_h,_a,cc){
	$('msgtxt').value='';
	var d1=$(p);var d2=$(c);
	h=_h;a=_a;im=p;x=_x;y=_y;connt=cc;
	d2.style.position = 'absolute';
	d2.style.top=d1.offsetTop+y+'px';
	d2.style.left=d1.offsetLeft+x+'px';
	d2.style.display='block';
	$('mesImg').src=i;$('mesTD').innerHTML=t;$('msgUs').innerHTML=' '+t+' ';
	//$('addImg').src=i;$('addTD').innerHTML=t;$('addUs').innerHTML=' '+t+' ';
	//$('addDr').value='-1';
	$('msgtxt').focus();
	//CloseAdd();
	/*if(scon=='1')
		$('addTOCon').style.display='none';
	else if(scon=='2')
	{
		$('addTOCon').style.display='none';
		$('exist').style.display='block';
	}*/
}
function CloseMS(){$('msg').style.display='none';$('msgtxt').value='';b=null;h=null;a=null;}
function AddCont()
{
	var d1 = $(im);var d2 = $('add');
	d2.style.position='absolute';
	d2.style.top=d1.offsetTop+y+'px';
	d2.style.left=d1.offsetLeft+x+370+'px';
	d2.style.display='block';
	/*var dr=$('addDr');
	while(dr.length > 0) dr.remove(0);
	var op1 = document.createElement("OPTION");
	op1.text = 'General';op1.value = 'General';
	try{dr.add(op1, null);}catch(e){dr.add(op1);}
	if(idss!=null)
	{
		for(var i = 1; i<idss.length; i++)
		{
			var op = document.createElement("OPTION");
			op.text = idss[i];op.value = idss[i];
			try{dr.add(op, null);}catch(e){dr.add(op);}
		}
	}*/
}
/*function CloseAdd()
{
	$('add').style.display='none';
}*/
function _AddUs()
{
	$(connt).value=$('mesTD').innerHTML;
	__doPostBack(connt,'');
}