
/* Merged Plone Javascript file
 * This file is dynamically assembled from separate parts.
 * Some of these parts have 3rd party licenses or copyright information attached
 * Such information is valid for that section,
 * not for the entire composite file
 * originating files are separated by - filename.js -
 */

/* - input-label.js - */
// http://siti.provincia.sp.it/portal_javascripts/input-label.js?original=1
var ploneInputLabel={focus: function(){var t=jq(this);if(t.hasClass('inputLabelActive')&&t.val()==t.attr('title'))
t.val('').removeClass('inputLabelActive');if(t.hasClass('inputLabelPassword'))
ploneInputLabel._setInputType(t.removeClass('inputLabelPassword'),'password').focus().bind('blur.ploneInputLabel',ploneInputLabel.blur)},blur: function(){var t=jq(this);if(t.is(':password[value=""]')){t=ploneInputLabel._setInputType(this,'text').addClass('inputLabelPassword').bind('focus.ploneInputLabel',ploneInputLabel.focus);if(e.originalEvent&&e.originalEvent.explicitOriginalTarget)
jq(e.originalEvent.explicitOriginalTarget).trigger('focus!')}
if(!t.val())
t.addClass('inputLabelActive').val(t.attr('title'))},submit: function(){jq('input[title].inputLabelActive').trigger('focus.ploneInputLabel')},_setInputType: function(elem,ntype){var otype=new RegExp('type="?'+jq(elem).attr('type')+'"?')
var nelem=jq(jq('<div></div>').append(jq(elem).clone()).html().replace(otype,'').replace(/\/?>/,'type="'+ntype+'" />'));jq(elem).replaceWith(nelem);return nelem}};jq(function(){jq('form:has(input[title].inputLabel)').submit(ploneInputLabel.submit);jq('input[title].inputLabel').bind('focus.ploneInputLabel',ploneInputLabel.focus).bind('blur.ploneInputLabel',ploneInputLabel.blur).trigger('blur.ploneInputLabel')});

/* - gc_openmap.js - */
// http://siti.provincia.sp.it/portal_javascripts/gc_openmap.js?original=1
function openMap(mapsetid,template,parameters){var baseURL='http://siti.provincia.sp.it/gisclient/';if(!template){alert("manca il template per il mapset");return}
var winWidth=window.screen.availWidth-8;var winHeight=window.screen.availHeight-55;var winName='mapset_'+mapsetid;if(!parameters) parameters='';if(template.indexOf('?')>0)
template=template+'&';else
template=template+'?';var mywin=window.open(baseURL+template+"mapset="+mapsetid+parameters,winName,"width="+winWidth+",height="+winHeight+",menubar=no,toolbar=no,scrollbar=auto,location=no,resizable=yes,top=0,left=0,status=yes");mywin.focus()}
function openMap2(mapsetid,template,parameters){var baseURL='http://siti.provincia.sp.it/gisclient/';var winWidth=window.screen.availWidth-8;var winHeight=window.screen.availHeight-55;var winName='mapset_'+mapsetid;template="template/"+template;if(!parameters) parameters='';if(template.indexOf('?')>0)
template=template+'&';else
template=template+'?';var mywin=window.open(baseURL+template+"mapset="+mapsetid+'&'+parameters,winName,"width="+winWidth+",height="+winHeight+",menubar=no,toolbar=no,scrollbar=auto,location=no,resizable=yes,top=0,left=0,status=yes");mywin.focus()}

