function gestMenu(myId,path){
     window.location=path;
}
function AccendiMenu(id){
 
       /* document.getElementById("m0").className="boxmenu_nav_elem";
        document.getElementById("m1").className="boxmenu_nav_elem";
        document.getElementById("m2").className="boxmenu_nav_elem";
        document.getElementById("m3").className="boxmenu_nav_elem";
        document.getElementById("m4").className="boxmenu_nav_elem";
        document.getElementById("m5").className="boxmenu_nav_elem";
        document.getElementById("m6").className="boxmenu_nav_elem";
        var onId="m" + id;
         if(id!= 0 && id!= null)
            document.getElementById("m"+(id-1)).className="boxmenu_nav_pre_selected_elem";
        document.getElementById(onId).className="boxmenu_nav_selected_elem";*/

}
function checkEnter(e){ //e is event object passed from function invocation
    var characterCode //literal character code will be stored in this variable
    if(e && e.which){ //if which property of event object is supported (NN4)
        e = e
        characterCode = e.which //character code is contained in NN4's which property
    }
    else{
	    try{
	       e=event;
	    }
	    catch(errore)
	    {
    		e=Event;
    	}
        characterCode = e.keyCode //character code is contained in IE's keyCode property
    }
    if(characterCode == 13)
    	return "OK";
    else
    	return "KO";    
}
$().ready(function() {
	$('#formInnerLogin').focus();
	
    if($('#MSOTlPn_Tbl')[0]!=null)
   	 	{
   	 	$('#MSOTlPn_Tbl')[0].style.left='133px';
		$('#MSOTlPn_Tbl')[0].style.top='350px';
		$('#MSOTlPn_Tbl').jqDrag('#MSOTlPn_ToolPaneCaption');
		}
	if($('#ContainerPublishingDivDraggabile')[0]!=null){
   	    //$('#ContainerPublishingDivDraggabile').jqDrag('#ContainerPublishingDivDraggabileHeader');
   	    $('#ContainerPublishingDivDraggabile').jqDrag();
   	    }			
	}
	
	);

/*function openResultSubmitMessageMasterPage(message,ok,unblock,larghezza,altezza){
var wh='300px';
var ht='100px';
if(larghezza!=null)
	wh=larghezza;
if(altezza!=null)
	ht=altezza;
jQuery.blockUI({  
        message: jQuery('#tallContentMaster'),
        css:
        { 
        	textAalign:'center',
		    borderStyle:'solid', 
		    borderWidth:'1px', 
		    backgroundColor:'#DCDEE4', 
		    width:wh, 
		    height:ht
        }
   });
   var closestr='';
   if(unblock!=null)
   closestr="alt='chiudi' style='cursor:pointer' onclick='jQuery.unblockUI()'";
   if(ok==null)
   		message="<div style='padding:3px'>" + message + "<br><img " + closestr +  "  src='/images/kpinormallarge-2.gif' /></div>";
   else
   	message="<div style='padding:3px'>" + message  + "<br><img " + closestr +  "  src='/images/kpinormallarge-0.gif' /></div>";

 $('#tallContentMaster')[0].innerHTML=message;
 if(unblock==null)
 	setTimeout(jQuery.unblockUI, 3000); 

}*/
function openResultSubmitMessageMasterPage(message,ok,unblock,larghezza,altezza){
var wh='300px';
var ht='100px';
if(larghezza!=null)
	wh=larghezza;
if(altezza!=null)
	ht=altezza;
   var closestr='';
   
   closestr="alt='chiudi' style='cursor:pointer' onclick='jQuery.unblockUI()'";
   if(ok==null)
   		message="<div style='padding:3px'>" + message + "<br><img " + closestr +  " alt='chiudi'  src='/images/kpinormallarge-2.gif' width=22 height=22 /></div>";
   else
   	message="<div style='padding:3px'>" + message  + "<br><img " + closestr +  " alt='chiudi'  src='/images/kpinormallarge-0.gif' width=22 height=22  /></div>";
  $.blockUI({ message: message,
			overlayCSS: { backgroundColor: '#E0E0E0' },
			css: { 
        border: '1px solid black'} 
 });
 if(unblock==null)
 	setTimeout(jQuery.unblockUI, 3000); 

}

function get_cookie ( cookie_name )
{
  var results = document.cookie.match ( '(^|;) ?' + cookie_name + '=([^;]*)(;|$)' );

  if ( results )
    return ( unescape ( results[2] ) );
  else
    return null;
}
function post_to_url(path, params, method) 
{    
    method = method || "post"; 
    // Set method to post by default, if not specified.    
    // The rest of this code assumes you are not using a library.    
    // It can be made less wordy if you use one.    
    var form = document.createElement("form");    
    form.setAttribute("method", method);    
    form.setAttribute("action", path);    
    for(var key in params) {        
    var hiddenField = document.createElement("input");        
    hiddenField.setAttribute("type", "hidden");        
    hiddenField.setAttribute("name", key);        
    hiddenField.setAttribute("value", params[key]);        
    form.appendChild(hiddenField);    }    
    document.body.appendChild(form);    // Not entirely sure if this is necessary    
    form.submit();
}

