// File             : submit2url.js
// Programmer       : Filippo di Pisa
// Copyright (c) Pitbull technology srl, 2003. All rights reserved.
// http://www.ezechiele.com
/*use: <body onLoad="available_width=eval(screen_width);
          			available_height=eval(screen_height);
					layerObject('yourDiv','ezmainid',#screenw#,#screenh#, available_width,available_height);
					<div id="yourDiv" style="{
											position:#position#;
											top:#top#px;
											left:#leftmy#px;
											right:#rightmy#px;
											width:#width#;
											height:#height#; 
											background-image:#b_image#;
											background-repeat:#b_repeat#;
										
											filter:#filter#;
											-moz-opacity:#moz_opacity#;
											visibility:#visibility#;
											cursor:move;
										}" 
										onMouseDown="drags('yourDiv',#rightmy#,#top#)"
										onResize="history.go(0);"
						</div>
					

*/
//script to conver form submit to url submit

//	layerObject('ezdhtmlmenu_21849_macco','ezmainid',1259,689, available_width,available_height,'true');					
//layerObject('ezmenu1','ezmainid',1259,689, available_width,available_height);
function layerObject(id,mainid,originalscreenw,originalscreenh,screenw,screenh,menu_dhtml,my_y,panel) {
	//ak is layer principal width (costant)
	//b is is distance from main layer(layout) to right margin of the screen
	//d  is distance from layer(es logo) to right margin of the screen
	//e is distance from layer(es logo) to right margin of main layer(layout) 
	//gk is dimension of screen when it saved positions
		var ak;
		var b;
		var c;
		var d;
		var e;
		var f;
		var gk;
		var ck;
		this.id=eval(layerRef+id+endLayerRef+styleRef);
		this.mainid=eval(layerRef+mainid+endLayerRef+styleRef);
		gk=originalscreenw;
		ak=parseInt(this.mainid.width);
		ck=(gk-ak)/2;
		//when i resize screen
		b=screenw;
		c=(b-ak)/2;
		d=(parseInt(this.id.right)-ck)+c;
		if (c>0){
			e=d-c;
			
		} else {	
			e=d-0.1;
		}
		//document.my.templ.value=e+"e";
		//document.my.temph.value=d+"d";
		browser = navigator.appName;
		browserNum = parseInt(navigator.appVersion);
		N = false;
		IE = false;
		if (browser == "Netscape") N = true;
			else IE = true;
		
		if(IE){
			this.id.right=d;
		} else {
			this.id.right=d-10;
		}
		
		if(menu_dhtml){
			
				my_x=eval(screen_width)-d;
				
				//my_x=event.clientX;
				my_y=parseFloat(my_y);
				my_x=parseFloat(my_x);
				//ezmenudhtml_menu_dhtmlid_panel
				//my_panel_0=id.substr(12);
				//my_panel_1=my_panel_0.indexOf("_");
				//my_panel_2=my_panel_0.substr(my_panel_1+1);
				
				//showPermPanel(my_panel_2, my_x, my_y);
				//posPanel(my_panel_2, my_x, my_y);
				//alert(id);
				nested_functions(my_x,my_y,panel);
			
		}
		//return this.id;
			/*this.obj = eval(layerRef+id+endLayerRef+styleRef);
			this.mainlayer=eval(layerRef+mainid+endLayerRef+styleRef);
			a=this.mainlayer.width;
			alert(a);
			c=(screenw-a)/2;
			d=this.obj.right;
			e=d-c;
			this.obj.left = e;
			
			//document.myform.tempr.value=rightresult;
			document.my.templ.value=this.obj.left;
			document.my.temph.value=20;
			//return this.obj;
		*/
	
}

function layerSetup() {
		//alert(available_width/2-100+"+"+available_height);
		//centerLyr = new layerObject('centerLayer', available_width/2,available_height/2);
		defaultResolutionW=1276;
		defaultResolutionH=569;
		centerLyr = new layerObject('ezdivid1','mainid',1280,568, available_width,available_height);
		
}

