function expandcontent(tid,cid)
{	
	if(document.getElementById(cid).className=="switchcontent")
	{
		document.getElementById(cid).className="oncontent"
		document.getElementById(tid).className="expanded";
	}
	else if(document.getElementById(cid).className=="oncontent")
	{
		document.getElementById(cid).className="switchcontent"
		document.getElementById(tid).className="collapsed";
	}
}

function openall()
{
	//alert("Hi")
	var obj=document.getElementsByTagName("div");
	for(i=0;i<obj.length;i++)
	{
		if (obj[i].className!="" && obj[i].className!=null )
		{
			if(obj[i].className=="switchcontent"){obj[i].className="oncontent";}
			if(obj[i].className=="collapsed"){obj[i].className="expanded";}
		}
	}
}

function closeall()
{
	var obj=document.getElementsByTagName("div");
	for(i=0;i<obj.length;i++)
	{
		if (obj[i].className!="" && obj[i].className!=null )
		{
			if(obj[i].className=="oncontent"){obj[i].className="switchcontent";}
			if(obj[i].className=="expanded"){obj[i].className="collapsed";}
		}
	}
}

function BM_openPopup( url, name, widgets, openerUrl )
{
        //var host = location.hostname;
        window.top.name = "opener";
        var popupWin = window.open( url, name, widgets );

        if ( popupWin && popupWin.opener ) {
                if ( openerUrl )
                {
                        popupWin.opener.location = openerUrl;
                        popupWin.focus();
                }
        }
}

function BM_openMap()
{
	var msloc=location.href;
	var msloc2=msloc.indexOf('.com/')
	var msloc1=msloc.substring(0,msloc2);
	msloc1=msloc1.replace('www.','bmser.');
    msloc1=msloc1.replace('img.','bmser.');
    msloc1=msloc1.replace('image.','bmser.');	
	var popurl=msloc1+".com/messenger/msgnew.html";
	BM_openPopup(popurl,"275x470","width=275,height=470,scrollbars=no,resizable=no")
}
