var user_agent = navigator.userAgent;
var isOpera = user_agent.indexOf("Opera") >= 0;
var isFirefox = user_agent.indexOf("Firefox") >= 0;
var isWin32up = user_agent.indexOf("Win32") >= 0 
	|| user_agent.indexOf("Win64") >= 0
	|| user_agent.indexOf("Windows NT") >= 0;

// disallow Opera faking IE
var isIE = !isOpera && user_agent.indexOf("MSIE") >= 0;
var isIE55up = isIE && isWin32up && user_agent.match(/MSIE ((5\.5)|[6789])/);
var isIE55dn = isIE && !isIE55up;
var browser = "other";

if (isFirefox)
	browser = "firefox";
else if (isOpera) 
	browser = "opera";
else if (isIE55up) 
	browser = "ie55p";
else if (isIE55dn) 
	browser = "ie55d";

function WriteSWF(width, height, movie, wmode) {
	if (wmode == null) wmode = "window";
	var ht = '';
	ht += '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="' + width + '" height="' + height + '">';
	ht += '<param name="movie" value="' + movie + '">';
	ht += '<param name="wmode" value="' + wmode + '">';
	ht += '<param name="Menu" value="false">';
	ht += '<param name="Quality" value="High">';
	ht += '<embed src="' + movie + '" quality=high ';
	ht += ' wmode="' + wmode + '" width="' + width + '" height="' + height + '"';
	ht += ' menu="false"';
	ht += ' type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" >';
	ht += '</embed>';
	ht += '</object>';
	document.write(ht);
}

function setHomePage2(url) {
  var ths = document.getElementById("imgDummy");
  
  if (isIE) {
	  ths.style.behavior='url(#default#homepage)';
	  ths.setHomePage(url);
  } else {
    // alert("");
  }
}

function add2Favorites(ths, url, title) {
	if (isIE && window.external != null) {
		window.external.AddFavorite(url,title);
	} else if (isFirefox && window.sidebar && window.sidebar.addPanel) {
		window.sidebar.addPanel(title, url, '');
	} else if (isOpera) {
		ths.rel = "sidebar";
		ths.title = title
		ths.href = url;
	}
}

function poptastic(url) {
	var newwindow=window.open(url,'name','height=400,width=176,titlebar=0,status=yes');
	newwindow.focus();
}

