// JavaScript Document
function browser_detect()
{
	var browserName=navigator.appName;
	/*if (browserName=="Microsoft Internet Explorer")
	{
		document.getElementById('main').style.top= (-15)+'px';
	}
	else
	{
		document.getElementById('main').style.top=(-8)+'px';
	}*/

}
function accordion(index)
{
	var menuitem = new Array('submenu1','submenu2','submenu3','submenu4','submenu5','submenu6');
	var count = 0;
	
	while(count < 6)
	{
		if(index == menuitem[count])   //changes background image of only the menu on which mouse over occur
		{
			var div = document.getElementById(index);
		
			if(div != null && div != undefined)
			{
				div.style.backgroundImage='url(http://imento.eu/wp-content/themes/imento/images/o'+index+'.gif)';
				div.style.backgroundRepeat='no-repeat';	
			}
		}
		else
		{ //Reset the background image of other menus 
			var resize_div = document.getElementById(menuitem[count]);
			
			if(resize_div != null && resize_div != undefined)
			{
				resize_div.style.backgroundImage='url(http://imento.eu/wp-content/themes/imento/images/'+menuitem[count]+'.gif)';
				resize_div.style.backgroundRepeat='no-repeat';
			}
		}
		
		count++;
	}
}

function zoom_phone()
{
	var phone_box=document.getElementById('zoom_phone');
	phone_box.style.visibility='visible';
}
function remove_zoom()
{   
	var num=document.getElementById('zoom_phone').style.visibility='hidden';
}
function set_middlediv_height()
{
 var textdiv_height; 
 if(document.URL =='http://imento.eu/forsiden/' || document.URL =='http://imento.eu/')
 {
 textdiv_height=(document.getElementById('et').offsetHeight) + 305;
 
 }

else
{
 textdiv_height=(document.getElementById('et').offsetHeight);	
}
if(textdiv_height - 260 <= 305)
 	textdiv_height = 305 + 260;
 
 var middle_div=document.getElementById('middle_container');
 middle_div.style.height=(textdiv_height +15) +"px";
 //alert(middle_div.style.height);
 var height=textdiv_height;
 //document.getElementById('watermark_logo').style.top=(height -260) +"px";
 
 
}
function show_chatbox()
{   
    document.getElementById('rightsidebar_b').style.visibility='hidden';
	document.getElementById('chatbox').style.visibility='visible';
	 
	
}

$(document).ready(function()
{
	//hide the all of the element with class msg_body
	$(".msg_body").hide();
	
	//slides the element with class "msg_body" when mouse is over the paragraph
	$("#accordion p.msg_head").mouseover(function()
    {
		
	     $(this).next("div.msg_body").slideDown("slow").siblings("div.msg_body").slideUp("slow");
	});
});
