img01on = new Image;
img01off = new Image;
img02on = new Image;
img02off = new Image;
img03on = new Image;
img03off = new Image;
img04on = new Image;
img04off = new Image;
img05on = new Image;
img05off = new Image;
img06on = new Image;
img06off = new Image;
img07on = new Image;
img07off = new Image;
img08on = new Image;
img08off = new Image;

img01on.src = "images/design/butt1.gif";
img01off.src = "images/design/butt1c.gif";
img02on.src = "images/design/butt2.gif";
img02off.src = "images/design/butt2c.gif";
img03on.src = "images/design/butt3.gif";
img03off.src = "images/design/butt3c.gif";
img04on.src = "images/design/butt4.gif";
img04off.src = "images/design/butt4c.gif";
img05on.src = "images/design/butt5.gif";
img05off.src = "images/design/butt5c.gif";
img06on.src = "images/design/butt6.gif";
img06off.src = "images/design/butt6c.gif";
img07on.src = "images/design/butt7.gif";
img07off.src = "images/design/butt7c.gif";
img08on.src = "images/design/butt8.gif";
img08off.src = "images/design/butt8c.gif";

function on(imgName) {
	//alert('do');
imgOn = eval (imgName + "on.src");
document [imgName].src = imgOn;
//alert('posle');
}

function off(imgName) {
imgOff = eval (imgName + "off.src");
document [imgName].src = imgOff;}



function showbig(picname) {
    window.open('includes/fotoph~1.php'+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');
   }
 }
 
