window.addEventListener("load",function(){

document.getElementById("contentAreaContextMenu").addEventListener("popupshowing", 
function(){
	if(!window.yass.m_pref.showcontextmenu) return;
	var hideall = false;
	if(gContextMenu.onImage || gContextMenu.onTextInput || gContextMenu.onMathML || gContextMenu.onLink || gContextMenu.onMailtoLink || gContextMenu.isContentSelected) hideall = true;
	var presetid = yass.m_prefservice.CopyCharPref("extensions.yass.selectedpreset");
	var list = ["red","green","blue"];
	for(var i in list) 
	{
		document.getElementById("yass-changepreset-"+list[i]).hidden = (hideall || list[i].indexOf(presetid)>=0);
	}
	document.getElementById("yass-changepreset-sep").hidden = hideall;
},false);

},false);

