
function JustSoPicWindow(imageName,imageWidth,imageHeight,alt,bgcolor) {
    // by E Michael Brandt of ValleyWebDesigns.com - Please leave these comments intact.
    // version 3.0.4
    newWindow =window.open("","","width="+imageWidth+",height="+imageHeight+",left=100,top=80");
    newWindow.document.open();
    newWindow.document.write('<html><title>'+alt+'</title><body leftmargin="0" topmargin="0" marginheight="0" marginwidth="0" bgcolor='+bgcolor+' onBlur="self.close()" onClick="self.close()">');
    newWindow.document.write('<table width='+imageWidth+' border="0" cellspacing="0" cellpadding="0" align="center" height='+imageHeight+' ><tr><td bgcolor=#FFFFFF>');
    newWindow.document.write('<img src="'+imageName+'" width='+imageWidth+' height='+imageHeight+' alt="Click screen to close" >');
    newWindow.document.write('</td></tr></table></body></html>');
    newWindow.document.close();
    newWindow.focus();
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function apri(url,nome){
   window.open(url,nome,'resizable=1,location=0,directories=0,status=1,menubar=0,scrollbars=1,toolbar=0,width=550,height=400')
}

function OpenPopup(File){
	window.open(File,'','height=600,width=800,left=200,top=100,status=1,toolbar=0,menubar=0,location=0,resizable=1,border=0,scrollbars=1',true);
}

/******************************************************************************
/** XHConn - Simple XMLHTTP Interface - bfults@gmail.com - 2005-04-08        **
 ** Code licensed under Creative Commons Attribution-ShareAlike License      **
 ** http://creativecommons.org/licenses/by-sa/2.0/                           **/
function XHConn()
{
  var xmlhttp, bComplete = false;
  try { xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); }
  catch (e) { try { xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); }
  catch (e) { try { xmlhttp = new XMLHttpRequest(); }
  catch (e) { xmlhttp = false; }}}
  if (!xmlhttp) return null;
  this.connect = function(sURL, sMethod, sVars, fnDone)
  {
    if (!xmlhttp) return false;
    bComplete = false;
    sMethod = sMethod.toUpperCase();
    try {
      if (sMethod == "GET")
      {
        xmlhttp.open(sMethod, sURL+"?"+sVars, true);
        sVars = "";
      }
      else
      {
        xmlhttp.open(sMethod, sURL, true);
        xmlhttp.setRequestHeader("Method", "POST "+sURL+" HTTP/1.1");
        xmlhttp.setRequestHeader("Content-Type",
          "application/x-www-form-urlencoded");
      }
      xmlhttp.onreadystatechange = function(){
        if (xmlhttp.readyState == 4 && !bComplete)
        {
          bComplete = true;
          fnDone(xmlhttp);
        }};
      xmlhttp.send(sVars);
    }
    catch(z) { return false; }
    return true;
  };
  return this;
}

// doAJAXCall : Generic AJAX Handler, used with XHConn
// Author : Bryce Christensen (www.esonica.com)
// PageURL : the server side page we are calling
// ReqType : either POST or GET, typically POST
// PostStr : parameter passed in a query string format 'param1=foo&param2=bar'
// FunctionName : the JS function that will handle the response

var doAJAXCall = function (PageURL, ReqType, PostStr, FunctionName) {

	// create the new object for doing the XMLHTTP Request
	var myConn = new XHConn();

	// check if the browser supports it
	if (myConn)	{
	    
	    // XMLHTTPRequest is supported by the browser, continue with the request
	    myConn.connect('' + PageURL + '', '' + ReqType + '', '' + PostStr + '', FunctionName);    
	} 
	else {
	    // Not support by this browser, alert the user
	    alert("XMLHTTP not available. Try a newer/better browser, this application will not work!");   
	}
}
/*****************************************************************************/
// Script di attivazione del ColorBox
$(document).ready(function(){
	//Examples of how to assign the ColorBox event to elements
	$("a[rel='DP_ColorBox']").colorbox();
	//$("a[rel='example2']").colorbox({transition:"fade"});
	//$("a[rel='example3']").colorbox({transition:"none", width:"75%", height:"75%"});
	//$("a[rel='example4']").colorbox({slideshow:true});
	//$(".example5").colorbox();
	//$(".example6").colorbox({iframe:true, innerWidth:425, innerHeight:344});
	//$(".example7").colorbox({width:"80%", height:"80%", iframe:true});
	//$(".example8").colorbox({width:"50%", inline:true, href:"#inline_example1"});
	//$(".example9").colorbox({
	//	onOpen:function(){ alert('onOpen: colorbox is about to open'); },
	//	onLoad:function(){ alert('onLoad: colorbox has started to load the targeted content'); },
	//	onComplete:function(){ alert('onComplete: colorbox has displayed the loaded content'); },
	//	onCleanup:function(){ alert('onCleanup: colorbox has begun the close process'); },
	//	onClosed:function(){ alert('onClosed: colorbox has completely closed'); }
	//});

});


