
	function detectSize(obj, event){
		lines = obj.value.split("\n");
		rows = lines.length ;

		for(i=0; i < lines.length; i++){
			if(lines[i].length > obj.cols){
				rows+= Math.round(lines[i].length / obj.cols);
			}
		}


		if(rows > 3){
			obj.rows = rows + 1;
		} else {
			obj.rows = 5;
		}
	}



		function getRealLeft(el){
			var L=0;
			var tempEl = el;
			lastone = tempEl.offsetLeft;

			while(tempEl.parentNode){

				L+= ( tempEl .offsetLeft)? tempEl .offsetLeft: 0;
				if(tempEl == document.body) break;
				tempEl = tempEl .parentNode;
				

			}
			return L;
		}



		function showSubmenu(obj,boxwidth){

			no = obj.id.split("_")[1];
			id = "submenu_"+no;
			document.getElementById("link_"+no).className = "itemleftbg";
			obj = document.getElementById("link_"+no);


			document.getElementById(id).style.display = '';
			document.getElementById(id).style.left = Math.round(obj.offsetLeft + (obj.offsetWidth /2) ) - (boxwidth / 2) +"px";




			if(REMOTE_ADDR == "68.149.179.51"){
 
				if(obj.offsetLeft < 150){
					ieoffset = getRealLeft(obj);
					document.getElementById(id).style.left = Math.round(ieoffset + (obj.offsetWidth /2) ) - (boxwidth / 2) +"px";
					
				}

				//alert(obj.offsetLeft);


			}


			document.getElementById(id+"_helper").style.width = (obj.offsetWidth)+"px";
			document.getElementById(id+"_helper").style.marginLeft = Math.round((boxwidth-16 - obj.offsetWidth) /  2)+"px";


			
		}

		function hideSubmenu(obj){
			no = obj.id.split("_")[1];
			id = "submenu_"+no;
			document.getElementById("link_"+no).className = "itemleftbg2";

			document.getElementById(id).style.display = 'none';


		}

