
function open_window(url) {
	if ( url.match(/popup/g) ) {
		url = url.replace( "popup:/", "/layout/set/popup" );
		url = "/" + current_siteaccess + url;
//		alert(url);
// 		popup://sections/diagnostic/products/wet_chemistry/falcor_350/technical_specification
//		open_window(url);
	}
	mywin = window.open(url, 'MenariniPopupWindow', 'scrollbars,width=516,height=500,left=20,top=20,resizable');
}

function apriFinestra(url) {
	
	mywin = window.open(url, 'MenariniPopupWindow', 'scrollbars,width=516,height=500,left=20,top=20,resizable');
}

function open_image(url,winwidth,winheight) {
	//url = "/" + current_siteaccess + "/layout/set/image/" + url;
	url = "/layout/set/image/" + url;
	winwidth=eval(winwidth)+20;
	winheight=eval(winheight)+60;

	mywin = window.open(url, 'MenariniPopupWindow', 'scrollbars,width='+winwidth+',height='+winheight+',left=20,top=20,resizable');
}

function open_pagelayout(url, class_id) 
{
	if ( url.match(/popup/g) ) {

		// {* Class Pdf folder has the id 52 *}
		if (class_id == 52) {
			url = url.replace( "popup:/", "/layout/set/bibliography" );
			url = "/" + current_siteaccess + url;		

			mywin = window.open(url, 'MenariniPopupWindow', 'scrollbars,width=640,height=500,left=20,top=20,resizable');
		}
	}
}


function DisplayFlashObject(v_movie, v_width, v_height, v_object, v_quality, v_play) 
{
    var oeTags = '<object codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0"'
	+ 'width="'+v_width+'" height="'+v_height+'" id="'+v_object+'">'
	+ '<param name="movie" value='+v_movie+' />'
	+ '<param name="quality" value="'+v_quality+'" />'
	+ '<param name="play" value="'+v_play+'" />'
	+ '<param name="loop" value="'+v_loop+'" />'
	+ '<embed src="'+v_movie+'"'
		+ 'type="application/x-shockwave-flash"'
		+ 'quality="'+v_quality+'" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"'
		+ 'width="'+v_width+'" height="'+v_height+'" play="'+v_play+'"'
		+ 'loop="'+v_loop+'" name="'+v_loop+'">'
        + '</embed>'
	+ '</object>';	
	
	document.write(oeTags);
}

