
function openVerMenu(mid){
	if ($('vsubmenu_'+mid).style.display=='none'){
		$('vsubmenu_'+mid).style.display='';
		$('vmenu_group_'+mid).style.background='#cdcbcb';
		$('vmenu_groups_'+mid).style.border='none';
		saveOpenedMenu(mid,1);
		
	}else{
		$('vsubmenu_'+mid).style.display='none';
		$('vmenu_group_'+mid).style.background='none';
		$('vmenu_groups_'+mid).style.borderBottom='none';
		saveOpenedMenu(mid,0);
	}
}
function saveOpenedMenu(mid,stat){
	var url = saveMenuScript+'?mid='+mid+'&stat='+stat+'';
	new Ajax.Request(url, {
	  method: 'get',
	  onSuccess: function(transport) {
	    void(0);
	  }
	});
}
var fade_speed = 5000;
var fade_duration = 80;

var t;
var j = 0;
var p = image.length;
var pre_load = new Array();
for (i = 0; i < p; i++) {
	if(image[i]){
	  pre_load[i] = new Image();
	  pre_load[i].src = image[i];
	//  alert(pre_load[i].src);
	}
}

function start_fade() {
  if (document.all) {
    document.images.SlideShow.style.filter="blendTrans(duration=fade_duration)";
    document.images.SlideShow.filters.blendTrans.Apply();
  }
  if (pre_load[j])document.images.SlideShow.src = pre_load[j].src;
  if (document.all) {
    document.images.SlideShow.filters.blendTrans.Play();
  }
  j = j + 1;
  if (j > (p - 1)) j = 0;
    t = setTimeout('start_fade()', fade_speed);
}

function product_detailed(id, lang) {
	wo = 480;
	ho = 320;

  w = wo + 32;
  h = ho + 96;
  wleft = (screen.width - w) / 2;
  wtop = (screen.height - h) / 2;

  if (wleft < 0) {
    w = screen.width;
    wleft = 0;
  }
  if (wtop < 0) {
    h = screen.height;
    wtop = 0;
  }

	window.open("/product_detailed.html?id="+id+"&lang="+lang, 'detailed',"width="+wo+",height="+ho+",left="+wleft+",top="+wtop+",status=0,toolbar=0,resizable=0,scrollbars=1,location=0,menubar=0,directories=0");
}