var hideme;
var wintmenu;
var strobjnameon = "<%=strobjnameon%>";
var mnustst;
window.onload = function()
{

 mnustst = window.setInterval("check_menu_stst()",2500);
}

function check_menu_stst()
{
			$("#"+strobjnameon).hide("fast");
}


function show_new(obj_str)
{
 strobjnameon = obj_str;
 window.clearInterval(mnustst);
	if( document.getElementById(obj_str).innerHTML != "" )
	{
		if(document.getElementById(obj_str).style.display == "none")
				document.getElementById(obj_str).style.display = "";
			//$("#"+obj_str).show("fast");
	}

}

function hide_new(obj_str)
{
  if(document.getElementById(obj_str).style.display == "")
		document.getElementById(obj_str).style.display = "none";
}

function show_hide(obj_str)
{
 if(document.getElementById(obj_str).style.display == "none")
	{
	 document.getElementById(obj_str).style.display = "";
	 //document.getElementById(obj_str).style.left  = "-110px";
	}
 else
	{
	document.getElementById(obj_str).style.display = "none";
	//document.getElementById(obj_str).style.left  = "-110px";
	}
	//window.clearTimeout(hideme);
}



function show_hide_menu(obj_str)
{
	show_hide(obj_str);
	//hideme = window.setTimeout("show_hide('"+obj_str+"')",500);
}


function open_win(str_url,str_name,str_para)
{
 res_win = window.open(str_url,str_name,str_para);
}

function do_submit(str_form,str_field1,str_field2,str_alert)
{
 if(document.getElementById(str_field1).value!="" && document.getElementById(str_field2).value!="") 
		 document.getElementById(str_form).submit()
else
	alert(str_alert);
}




var bookmarkurl="http://www.mevashlimdialog.co.il"
var bookmarktitle="ארגון פעילות"
function addbookmark(){
if (document.all)
window.external.AddFavorite(bookmarkurl,bookmarktitle)
}

function check_valid_email(str_email)
{
	var  ret_val = true;
	func_email = str_email;
	if(func_email.indexOf("@") < 4)
	{
	 ret_val=false
	}
	if(func_email.indexOf(".") == 1 || func_email.indexOf(".") == func_email.length)
	{
	 ret_val=false
	}
	return ret_val;
}


function changevotevalue(v_id)
{
 v_val = v_id;
}

function do_vote()
{
 location.href="vote.asp?vote="+v_val;
}



function valid_reg()
{
email = document.getElementById("email").value
 if(check_valid_email(email)==true)
{
	document.getElementById("m_list").submit()
}
	else
{
	alert("Invalid EMail address");
}

}

function valid_form(str_f)
{

	document.getElementById(str_f).submit();
}


function set_position(str_me)
{
	var center_board = 0;
	center_board = document.body.clientWidth;
	center_board = ((document.body.clientWidth - 760) / 2) + 760 - 200;
	document.getElementById(str_me).style.left = center_board + "px";
	//document.getElementById("login_frm").style.top = top_board + "px";
	
}
