//includo il file js utilizzato per l'implementazione dei Flash e degli oggetti OpenLaszlo
document.write("<script language=\"JavaScript\" type=\"text/javascript\" src=\"include/worinclude/library.js\"></script>");


function voidFunction(){
	//ie bug
}

function MM_preloadImages() {
	var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
	var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
		if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function OpenPopupImage(v_strIdImage,v_strTitle,v_strCharatteristics)
{
	var l_strZoomPageUrl = "";
	l_strZoomPageUrl = "/tools/utils/ZoomWindow.aspx?img=" + v_strIdImage + "&title=" + v_strTitle + "&chrt=" + v_strCharatteristics;
	window.open(l_strZoomPageUrl,"zoomImage","dependent=yes,Height=0,Width=0,location=no,menubar=no,resizable=yes,scrollbars=yes,status=no,titlebar=yes,toolbar=no");
}

function OpenPopupVideo(v_strVideoUrl,v_intWidth,v_intHeight)
{
  var v_intHeightWindow = v_intHeight + 50;
  var objWO = window.open('/tools/utils/videoplayer.lzx.swf?video=' + v_strVideoUrl + '&width=' + v_intWidth + '&height=' + v_intHeight,null,"dependent=no,Height=" + v_intHeightWindow + ",Width=" + v_intWidth + ",location=no,menubar=no,resizable=no,scrollbars=no,status=no,titlebar=no,toolbar=no");
}
function video(v_strVideoUrl)
{
  var objWO = window.open('/tools/utils/videoplayer.lzx.swf?video=' + v_strVideoUrl + '&width=600&height=400',null,"dependent=no,Height=450,Width=600,location=no,menubar=no,resizable=no,scrollbars=no,status=no,titlebar=no,toolbar=no");
}

function changeImage(v_strImageBoxName,v_strImage){
    var objImageBox = document.getElementById(v_strImageBoxName);
    objImageBox.src = v_strImage;
}

function OpenFlvVideo(strVideoUrl, strVideoImg){

    var strRandString = String.fromCharCode(97 + Math.round(Math.random() * 25)) +String.fromCharCode(97 + Math.round(Math.random() * 25)) +String.fromCharCode(97 + Math.round(Math.random() * 25)) +String.fromCharCode(97 + Math.round(Math.random() * 25)) +String.fromCharCode(97 + Math.round(Math.random() * 25)) +String.fromCharCode(97 + Math.round(Math.random() * 25)) + String.fromCharCode(97 + Math.round(Math.random() * 25)) + String.fromCharCode(97 + Math.round(Math.random() * 25)) + String.fromCharCode(97 + Math.round(Math.random() * 25));
    
    var s1 = new SWFObject('flvplayer.swf?rnd='+strRandString,'ply'+strRandString,'274','154','10','#');
    s1.useExpressInstall('/include/expressinstall.swf');
    s1.addParam('allowfullscreen','true');
    s1.addParam('allowscriptaccess','always');
    s1.addParam('wmode','opaque');
    s1.addParam('flashvars','image='+ strVideoImg +'&file='+ strVideoUrl +'&skin=bekle.swf&frontcolor=ffffff&lightcolor=CC0000&controlbar=over&stretching=uniform&autostart=true');
    s1.write('videoContainer');
    
}
function OpenFlvVideoBanner(strVideoUrl, strVideoImg){

    var strRandString = String.fromCharCode(97 + Math.round(Math.random() * 25)) +String.fromCharCode(97 + Math.round(Math.random() * 25)) +String.fromCharCode(97 + Math.round(Math.random() * 25)) +String.fromCharCode(97 + Math.round(Math.random() * 25)) +String.fromCharCode(97 + Math.round(Math.random() * 25)) +String.fromCharCode(97 + Math.round(Math.random() * 25)) + String.fromCharCode(97 + Math.round(Math.random() * 25)) + String.fromCharCode(97 + Math.round(Math.random() * 25)) + String.fromCharCode(97 + Math.round(Math.random() * 25));
    
    var s1 = new SWFObject('flvplayer.swf?rnd='+strRandString,'ply'+strRandString,'592','336','10','#');
    s1.useExpressInstall('/include/expressinstall.swf');
    s1.addParam('allowfullscreen','true');
    s1.addParam('allowscriptaccess','always');
    s1.addParam('wmode','opaque');
    s1.addParam('flashvars','image='+ strVideoImg +'&file='+ strVideoUrl +'&skin=bekle.swf&frontcolor=ffffff&lightcolor=CC0000&controlbar=over&stretching=uniform&autostart=true');
    s1.write('videoContainer');
    
}