// Browser detection
var ie = (navigator.appName == "Microsoft Internet Explorer") ? true : false;
if(navigator.appName == "Netscape") {
	var nn = (parseInt(navigator.appVersion) >= 5) ? 6 : 4;
}
var dom = (ie || nn == 6) ? true : false;

function swapClass(obj) {
	var classPrefix = obj.className.substr(0, obj.className.indexOf('_'));
	var classSufix = obj.className.substr(obj.className.indexOf('_') + 1);
	if(classSufix == "inactive") obj.className = classPrefix + "_active";
	else obj.className = classPrefix + "_inactive";
}

function getURL(url) {
	document.location = url;
}

function finestra(url, width, height) {
	if(width == null) width = 500;
	if(height == null) height = 500;
	window.open(url, null, 'toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width='+width+',height='+height+'');
}

function OpenPopup(url, width, height) {
	if(width == null) width = 500;
	if(height == null) height = 500;
	window.open(url, null, 'toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width='+width+',height='+height+'');
}

function swapImage(obj) {
	var swaped = (obj.src.search('_over') != -1) ? true : false;
//	var clicked = (obj.src.search('_down') != -1) ? true : false;
	if(swaped) obj.src = obj.src.substr(0, obj.src.length - 9) + '.jpg';
	else obj.src = obj.src.substr(0, obj.src.length - 4) + '_over.jpg';
}

function activateFlash(obj){
		
bgcolor = (obj.bgcolor) ? obj.bgcolor : "#FFFFFF";

quality = (obj.quality) ? obj.quality : "high";


version = (obj.ver) ? obj.ver : 6;
    
	var str = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=' + version + ',0,0,0" ';
	
str += 'width="' + obj.width + '" height="' + obj.height + '" align="top">';
 
   
str += '<param name="movie" value="' + obj.name + '"/>';
    
str += '<param name="bgcolor" value="' + bgcolor + '"/>';
    

str += '<param name="quality" value="' + quality + '"/>';
	str += '<embed type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" src="'+obj.name+'" align="top" bgcolor="' + bgcolor + '" ';
	str += 'quality="' + quality + '" ';
	str += 'width="' + obj.width + '" height="' + obj.height + '"></embed></object>';

	document.writeln(str);
}

function activateFlash2(obj){
		


quality = (obj.quality) ? obj.quality : "high";

wmode   = (obj.wmode) ? obj.wmode : "transparent";

version = (obj.ver) ? obj.ver : 8;
    
	var str = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=' + version + ',0,0,0" ';
	
str += 'width="' + obj.width + '" height="' + obj.height + '" align="top">';
 
   
str += '<param name="movie" value="' + obj.name + '"/>';
    
str += '<param name="wmode" value="' + wmode + '"/>';
    

str += '<param name="quality" value="' + quality + '"/>';
	str += '<embed type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" src="'+obj.name+'" align="top" wmode="' + wmode + '" ';
	str += 'quality="' + quality + '" ';
	str += 'width="' + obj.width + '" height="' + obj.height + '"></embed></object>';

	document.writeln(str);
}

