function ShowHide(id)
{
	var obj;
	if (document.getElementById)
		obj=document.getElementById("d_" + id)
	else if (document.all)
		obj=document.all["d_" + id]
	obj.style.display = (obj.style.display=="block"?"none":"block");
}

function ShowHideWeather(id)
{
//debugger;
//alert(id.value);
document.getElementById("weather_Center").style.display = "none";
document.getElementById("weather_North").style.display = "none";
document.getElementById("weather_South").style.display = "none";
document.getElementById("weather_East").style.display = "none";
document.getElementById("weather_NorthEast").style.display = "none";
	var obj;
	if (document.getElementById)
		obj=document.getElementById("weather_" + id.value)
	else if (document.all)
		obj=document.all["weather_" + id.value]
	//obj.style.display = (obj.style.display=="block"?"none":"block");
	obj.style.display = "block";
}

function ShowHideWeather2(id)
{
debugger;
alert(idf);
document.getElementById("weather_Center").style.display = "none";
document.getElementById("weather_North").style.display = "none";
document.getElementById("weather_South").style.display = "none";
document.getElementById("weather_East").style.display = "none";
document.getElementById("weather_NorthEast").style.display = "none";
	var obj;
	if (document.getElementById)
		obj=document.getElementById("weather_" + id)
	else if (document.all)
		obj=document.all["weather_" + id]
	//obj.style.display = (obj.style.display=="block"?"none":"block");
	obj.style.display = "block";
}
	
function addfav()
{
	if (document.all)
    {
		window.external.AddFavorite("http://www.mandeldavid.com","mandeldavid");
    }
}

function GoToShoppingChart(SiteRoot, UserId, SiteLanguage)
{
	document.location.href= SiteRoot.replace('http:','https:') + '/ShoppingChart.aspx?UserId=' + UserId + '&SiteLanguage=' + SiteLanguage;
}

function fSearch(SiteRoot)
{
	//var CityId = document.forms[0].CityName_Id.value;
	var CityId = document.forms[0].lstCityName.value
	var Search = document.forms[0].city.value;
	window.location=SiteRoot + '/KinderGuardsList.aspx?CityId=' + CityId + '&Search=' + Search;

}



var classname = 'bg_right_nav_site';// this will test the class values, it holds the current value, and should correspond to the off state class 
var classname1 = 'bg_right_nav_site';// static value, change this to your class 1 name 
var classname2 = 'bg_right_nav_site_over';// static value, change this to your class 2 name 
var feature = 'single';// sets if only hover element or all changes :: options: 'single' or 'all' 

// gets all the elements of that have class classname and returns them as an array 
function getElementsByClassName(needle) 
{ 
   var my_array = document.getElementsByTagName("*"); 
   var retvalue = new Array(); 
   var i; 
   var j; 

   for (i=0,j=0;i<my_array.length;i++) 
   { 
      var c = " " + my_array[i].className + " "; 
      if (c.indexOf(" " + needle + " ") != -1) retvalue[j++] = my_array[i]; 
   } 
   return retvalue; 
} 

// if feature is set to all, this will switch all of the class items 
// loops through the classname array and switches them to their opposite values 
function toggle() 
{ 
   var divs = getElementsByClassName(classname) 
   for(i=0; i <divs.length;i++) 
   { 
      if(divs[i].className == classname1) 
      { 
         divs[i].className = classname2; 
         classname = classname2; 
      } 
      else 
      { 
         divs[i].className = classname1; 
         classname = classname1; 
      } 
   } 
} 

// for onmouseover 
function rollon(e) 
{ 
   var srcId, srcElement, targetElement; 
   if (window.event) e = window.event; 
   srcElement = ( e.srcElement ) ? e.srcElement : e.target; 

   if ( srcElement.className == classname1 ) 
   { 
      if ( feature == 'all' ) 
      { 
         toggle(); 
      } 
      else if ( feature == 'single' ) 
      { 
         srcElement.className = classname2; 
         classname = classname2; 
      } 
   } 
} 
// for mouseoff 
function rolloff(e) 
{ 
   var srcId, srcElement, targetElement; 
   if (window.event) e = window.event; 
   srcElement = ( e.srcElement ) ? e.srcElement : e.target; 

   if ( srcElement.className == classname2 ) 
   { 
      if ( feature == 'all' ) 
      { 
         toggle(); 
      } 
      else if ( feature == 'single' ) 
      { 
         srcElement.className = classname1; 
         classname = classname1; 
      } 
   } 
} 

// assign rollon() to handle onMouseOver events 
document.onmouseover = rollon; 

// assign rolloff() to handle onMouseOut events 
document.onmouseout = rolloff; 


function NavigateTo(url)
{
	document.location.href=url;
}


function DisplaySyleOn(elemId)
{
	document.getElementById(elemId).style.display = 'block';
}
function DisplaySyleOff(elemId)
{
	document.getElementById(elemId).style.display = 'none';
}


function Open_PopUp(msgid)
{
	window.location="http://www.mandeldavid.com/UserData.aspx";
}
function Open_PopUpTzatet(msgid)
{
	window.location="http://www.mandeldavid.com/UserData.aspx";
}
function OpenPopUp(msgid)
{
	window.open("PopUpForum.aspx?msgid=" + msgid,'PopUpForum','height=500,width=600');
}
function OpenPopUpTzatet(msgid)
{
	window.open("PopUpForum.aspx?msgid=" + msgid + "&tz=1",'PopUpForum','height=500,width=600');
}

function OpenPopUpSendToFriend()
{
	window.open("SendFriendEmail.aspx?isfriend=1" ,'PopUpForum','height=300,width=600');
}

function OpenPopUpSendTo()
{
	window.open("SendFriendEmail.aspx",'PopUpForum','height=10,width=10');
}

function Open_PopUpSendToFriend()
{
	window.location="http://www.mandeldavid.com/UserData.aspx";
}

function OpenPopUpSendToFriendPage()
{
	window.open("http://www.mandeldavid.com/PopUpSendToFriend.aspx" ,'PopUpForum','height=300,width=600');
}

function Open_PopUpSendTo()
{
	window.location="http://www.mandeldavid.com/UserData.aspx";
}

function OpenFPopUp(msgfid)
{
	window.open("PopUpForum.aspx?msgfid=" + msgfid,'PopUpForum','height=500,width=600');
}

function OpenEditorPopUp(msgid)
{
	window.open("PopUpForumEditor.aspx?msgid=" + msgid,'PopUpForum','height=500,width=600');

}

function OpenEditorDelPopUp(msgid)
{
	window.open("PopUpForumDel.aspx?msgid=" + msgid,'PopUpForum','height=10,width=10');

}

function wmpCreate(url) { 
		var str = ""; 
		if(-1 != navigator.userAgent.indexOf("MSIE")) { 
			// create the WMP for IE 
			str = '<object id="contentPlayer" classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6" width="320" height="240">'; 
		} else { 
			// create it for FF. 
			str = '<object id="contentPlayer" type="application/x-ms-wmp" data="'+url+'" width="320" height="240">'; 
		} 
		str += '<param name="URL" value="'+url+'" />'; 
		str += '<param name="uiMode" value="none">'; 
		str += '</object>'; 
		return str; 
	} 
	function wmpPlayStop() { 
		wmp.controls.stop();
	}
	function wmpPlayPause() {
		wmp.controls.pause();
	}
	function wmpPlayPlay() {
		wmp.controls.play();
	}
	function wmpPlayMute() {
	wmp.settings.mute = !wmp.settings.mute;
	}
	function wmpPlayMutet() {
		if(wmp.settings.mute)
		{
			wmp.settings.mute = false;
		}
		else
		{ 
			wmp.settings.mute = true; 
			}
			
	}




