var x=0;
var y=0;
var vis=0;
function submenu(num)
{
if (vis!=0&&vis!=num){
document.getElementById("sm"+vis).style.visibility="hidden";
}
document.getElementById("sm"+num).style.display="block";
document.getElementById("sm"+num).style.visibility="visible";
vis=num;

}

function del()
{
document.getElementById("sm"+vis).style.visibility="hidden";
}

  function showbig(picname) {
    window.open('/includes/foto.php5?pic='+picname,'_blank','scrollbars=yes,taskbar=no,resizeable=no,status=no,menubar=no,top=30,left=30,width=30,height=30');
  }
  
   
  function PreLoad(source) {
    var NewImage = new Image();
    NewImage.src = source;
  }
  
  function prepareSubmit(frm) {  	
    var len = frm.all("editbox").length; if (!len) len = 1;
    for (var i=0; i<len; i++)
      frm.all("codebox", i).innerText = frm.all("codebox", i).style.display ? borderOn(frm.all("codebox", i).innerText) : borderOn(frm.all("editbox", i).innerHTML);
  }
   
 function changeColor(mid,textColor,bgColor){
 	if(bgColor!="null")
    mid.style.backgroundColor = bgColor;
  if(textColor!="null")
    mid.style.color = textColor ;
 }  

 function menuProcess(menuId,tdId){
 	 if(menuId.style.display=='none'){
     menuId.style.display = 'block';
     changeColor(tdId,'#808AB0','null');
   }else{
   	 menuId.style.display = 'none';
     changeColor(tdId,'#525D8A','null');
   }
 }

function submenu1(num){
  document.getElementById(num).style.display="block";
}

function del1(num){
  document.getElementById(num).style.display="none";
}

function nav(loc){
	
strr= new String(loc);
if (strr.indexOf("?")!=-1)
{
	window.location=loc+'&meta=edit#met';}
	
else{
	window.location=loc+'?meta=edit#met';}
}
