var mpos = 0 ,tm,elm,smwidth = 360;
	function vglpicture(nimg,jppath)
	{
		src = "bvpgl.php?ppath=" + jppath + "&pwidth=398&pheight=300";
		document.images[nimg].src = src;
	}
	function goLeft() {
		tm = window.setInterval("moveLeft()",50);
	}

	function goRight() {
		tm = window.setInterval("moveRight()",50);
	}

	function goStop() {
		window.clearInterval(tm);
	}

	function moveLeft() {
		if (document.getElementById(elm))
		{
			element = document.getElementById(elm);
		}
		else
		{
			element = document.all(elm);
		}
		mpos = element.style.left.substring(0,element.style.Left.length-3);
		mpos-=3;
		if(mpos < (smwidth - element.clientWidth)) mpos+=3;
		element.style.left = mpos + "px";
	}

	function moveRight() {
		if (document.getElementById(elm))
		{
			element = document.getElementById(elm);
		}
		else
		{
			element = document.all(elm);
		}
		left = element.style.left;
		mpos = left.substring(0,left.length-3);
		document.write(mpos);
		mpos+=3;
		if (mpos>0) mpos = 0;
		element.style.left = mpos + "px";
	}

	function mLeft() {
		element = document.getElementById(elm);
		mpos = element.style.left;
		mpos-=30;
		if(mpos < (smwidth - element.clientWidth)) mpos+=30;
		element.style.left = mpos + "px";
	}

	function mRight() {
		mpos = document.all(elm).style.pixelLeft;
		mpos+=30;
		if (mpos>0) mpos = 0;
		document.all(elm).style.left = mpos + "px";
	}

	var image_window;
	function open_image_window(path,w,h)
	{
	image_window=open(path,'send_open','status=no,resizable=no,toolbar=no,menubar=no,scrollbars=no,height='+(h+20)+',width='+(w+20)+',left=200,top=200');
	}	

	var visible = new Array();
	function show_sub(id){
		document.getElementById("menu"+id).style.display = 'inline';
	}

	function hide(id){
		if(visible[id]==false) {
			document.getElementById("menu"+id).style.display = 'none';
		}
	}

	function hide_sub(id){
		setTimeout("hide('"+id+"')",50);
	}