function Browser(){
	var ua = navigator.userAgent.toLowerCase(); 
	this.Gecko = (ua.indexOf('gecko') != -1 && ua.indexOf('safari') == -1);
	this.Safari = (ua.indexOf('safari') != - 1);
	this.IE = (ua.indexOf('msie') != -1 && !this.Opera && (ua.indexOf('webtv') == -1) ); 
	this.Mozilla = (this.Gecko && ua.indexOf('gecko/') + 14 == ua.length);
	this.Firefox = ( (ua.indexOf('firebird/') != -1) || (ua.indexOf('firefox/') != -1) );
	this.NS = ( (this.Gecko) ? (ua.indexOf('netscape') != -1) : ( (ua.indexOf('mozilla') != -1) && !this.Opera && !this.Safari && (ua.indexOf('spoofer') == -1) && (ua.indexOf('compatible') == -1) && (ua.indexOf('webtv') == -1) && (ua.indexOf('hotjava') == -1) ) );
	this.IECompatible = ( (ua.indexOf('msie') != -1) && !this.IE);
	this.NSCompatible = ( (ua.indexOf('mozilla') != -1) && !this.NS && !this.Mozilla);
	this.geckoVersion = ( (this.Gecko) ? ua.substring( (ua.lastIndexOf('gecko/') + 6), (ua.lastIndexOf('gecko/') + 14) ) : -1 );
	this.equivalentMozilla = ( (this.Gecko) ? parseFloat( ua.substring( ua.indexOf('rv:') + 3 ) ) : -1 );
	this.versionMinor = parseFloat(navigator.appVersion); 
	if (this.Gecko && !this.Mozilla) this.versionMinor = parseFloat( ua.substring( ua.indexOf('/', ua.indexOf('gecko/') + 6) + 1 ) );
	else if (this.Mozilla) this.versionMinor = parseFloat( ua.substring( ua.indexOf('rv:') + 3 ) );
	else if (this.IE && this.versionMinor >= 4) this.versionMinor = parseFloat( ua.substring( ua.indexOf('msie ') + 5 ) );
	else if (this.Safari) this.versionMinor = parseFloat( ua.substring( ua.lastIndexOf('safari/') + 7 ) );
	this.versionMajor = parseInt(this.versionMinor); 
	this.DOM1 = (document.getElementById);
	this.DOM2Event = (document.addEventListener && document.removeEventListener);
	this.mode = document.compatMode ? document.compatMode : 'BackCompat';
	this.Win = (ua.indexOf('win') != -1);
	this.Win32 = (this.Win && ( ua.indexOf('95') != -1 || ua.indexOf('98') != -1 || ua.indexOf('nt') != -1 || ua.indexOf('win32') != -1 || ua.indexOf('32bit') != -1 || ua.indexOf('xp') != -1) );
	this.Mac = (ua.indexOf('mac') != -1);

	this.NS4 = (this.NS && this.versionMajor == 4);
	this.NS6x = (this.NS && this.versionMajor == 6);
	this.NS6up = (this.NS && this.versionMajor >= 6);
	this.NS7x = (this.NS && this.versionMajor == 7);
	this.NS7up = (this.NS && this.versionMajor >= 7);

	this.IE4 = (this.IE && this.versionMajor == 4);
	this.IE4up = (this.IE && this.versionMajor >= 4);
	this.IE5 = (this.IE && this.versionMajor == 5);
	this.IE55 = (this.IE && this.versionMinor == 5.5);
	this.IE5up = (this.IE && this.versionMajor >= 5);
	this.IE6x = (this.IE && this.versionMajor == 6);
	this.IE6up = (this.IE && this.versionMajor >= 6);
}
var is = new Browser();


var flashVersion = 0;
function getFlashVersion() {
	var latestFlashVersion = 8;
	var agent = navigator.userAgent.toLowerCase(); 
	if (navigator.plugins != null && navigator.plugins.length > 0) {
		var flashPlugin = navigator.plugins['Shockwave Flash'];
		if (typeof flashPlugin == 'object'){ 
			for (var i = latestFlashVersion; i >= 3; i--){
	            if (flashPlugin.description.indexOf(i + '.') != -1){
	               flashVersion = i;
	               break;
	            }
			}
		}
	}

	else if (agent.indexOf("msie") != -1 && parseInt(navigator.appVersion) >= 4 && agent.indexOf("win")!=-1 && agent.indexOf("16bit")==-1) {
		var doc = '<scr' + 'ipt language="VBScript"\> \n';
		doc += 'On Error Resume Next \n';
		doc += 'Dim obFlash \n';
		doc += 'For i = ' + latestFlashVersion + ' To 3 Step -1 \n';
		doc += '	Set obFlash = CreateObject("ShockwaveFlash.ShockwaveFlash." & i) \n';
		doc += '	If IsObject(obFlash) Then \n';
		doc += '		flashVersion = i \n';
		doc += '		Exit For \n';
		doc += '	End If \n';
		doc += 'Next \n';
		doc += '</scr' + 'ipt\> \n';
		document.write(doc);
	}
	else{
		flashVersion = flashVersion_DONTKNOW;
	}

return flashVersion;

}
flashVersion_DONTKNOW = -1;

function FlashObject(){
	this.maxVersion;
	this.SwfFile;

	this.minVersion;
	this.altSwfFile;

	this.altImage;
	this.altImageAddAtribute;
	this.altImageHTML;

	this.width;
	this.height;
	this.menu;
	this.background;
	this.wmode;
}

FlashObject.prototype.rnd=function(){
	this.ranNum= Math.random()*255;
    return this.ranNum;
}

FlashObject.prototype.embed=function(){
	if(getFlashVersion()>=this.maxVersion){
		document.write('<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" WIDTH='+this.width+' HEIGHT='+this.height+'><PARAM NAME=movie VALUE="'+this.SwfFile+'?'+this.rnd()+'"><PARAM NAME=menu VALUE='+this.menu+'><param name="wmode" value="'+this.wmode+'"><PARAM NAME="quality" VALUE="high"><PARAM NAME="bgcolor" VALUE="'+this.background+'">');
		document.write('<EMBED src="'+this.SwfFile+'?'+this.rnd()+'" menu="'+this.menu+'" wmode="'+this.wmode+'" quality="high" bgcolor="'+this.background+'"  WIDTH="'+this.width+'" HEIGHT="'+this.height+'" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></EMBED>');
		document.write('</OBJECT>');
	}
	else if((getFlashVersion()> this.minVersion) && (getFlashVersion()< this.maxVersion) && this.altSwfFile){
		document.write('<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" WIDTH='+this.width+' HEIGHT='+this.height+'><PARAM NAME=movie VALUE="'+this.altSwfFile+'?'+this.rnd()+'"><PARAM NAME=menu VALUE='+this.menu+'<param name="wmode" value="'+this.wmode+'">><PARAM NAME="quality" VALUE="high"><PARAM NAME="bgcolor" VALUE='+this.background+'>');
		document.write('<EMBED src="'+this.altSwfFile+'?'+this.rnd()+'" menu="'+this.menu+'" wmode="'+this.wmode+'" quality=high bgcolor='+this.background+'  WIDTH='+this.width+' HEIGHT='+this.height+' TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></EMBED>');
		document.write('</OBJECT>');
	}else{
		if(this.altImageAddAtribute){
			document.write('<img src="'+this.altImage+'" width="'+this.width+'" height="'+this.height+'" border="0" '+this.altImageAddAtribute+' />');
			document.write(this.altImageHTML);
		}else{
			document.write('<img src="'+this.altImage+'" width="'+this.width+'" height="'+this.height+'" border="0" />');
		}
	}
}


function init(){
	if ((!is.IE4  || !is.NS4) && (is.IE5 || is.IE55 || is.IE6up || is.NS6 || is.Safari ||is.Firefox)){
		imgArray = document.getElementsByTagName("img");
			for (i=0;i<imgArray.length;i++){
				if(imgArray[i].alt!=-1) imgArray[i].title=imgArray[i].alt;
			}
		aArray = document.getElementsByTagName("a");
			for (i=0;i<aArray.length;i++){
				if(aArray[i] && aArray[i].href && !aArray[i].title)	aArray[i].title = aArray[i].childNodes[0].nodeValue;
			}
	}
}

function externalLinks() {
	if (!document.getElementsByTagName) return;
	var anchors = document.getElementsByTagName("a");
	for (var i=0; i<anchors.length; i++) {
		var anchor = anchors[i];
		if (anchor.getAttribute("href") && anchor.getAttribute("rel") == "external") {
			anchor.target = "_blank";
		}
	}
}

function PopItUp(src,w,h,s) {
	if(s) w=w+17;
	Popwin = window.open(src,"popwin","toolbar=0,width=" + w + ",height=" + h + ",location=0,directories=0,status=0,scrollbars="+s+",menubar=0,resizable=0,copyhistory=1");
	Popwin.focus();
	return false;
}

function getUrl(url){
	if(url!='none'){
		document.location.href=url;
	}
}

window.onload=function(){
	//init();
	externalLinks();
}