function BrowserDetect(){
var ua=navigator.userAgent.toLowerCase(); 
	this.isGecko=(ua.indexOf('gecko')!=-1 && ua.indexOf('safari')==-1);
	this.isAppleWebKit=(ua.indexOf('applewebkit')!=-1);

	this.isSafari=(ua.indexOf('safari')!=- 1);
	this.isIE=(ua.indexOf('msie')!=-1 && !this.isOpera && (ua.indexOf('webtv')==-1)); 
	this.isMozilla=(this.isGecko && ua.indexOf('gecko/')+14==ua.length);
	this.isFirebird=(ua.indexOf('firebird/')!=-1);
	this.isNS=((this.isGecko)?(ua.indexOf('netscape')!=-1):((ua.indexOf('mozilla')!=-1) && !this.isOpera && !this.isSafari && (ua.indexOf('spoofer')==-1) && (ua.indexOf('compatible')==-1) && (ua.indexOf('webtv')==-1) && (ua.indexOf('hotjava')==-1)));

	this.isIECompatible=((ua.indexOf('msie')!=-1) && !this.isIE);

	this.geckoVersion=((this.isGecko)?ua.substring((ua.lastIndexOf('gecko/')+6), (ua.lastIndexOf('gecko/')+14)):-1);
	this.equivalentMozilla=((this.isGecko)?parseFloat(ua.substring(ua.indexOf('rv:')+3)):-1);
	this.appleWebKitVersion=((this.isAppleWebKit) ? parseFloat(ua.substring(ua.indexOf('applewebkit/')+12)):-1);

	this.versionMinor=parseFloat(navigator.appVersion); 

	if(this.isGecko && !this.isMozilla) this.versionMinor=parseFloat(ua.substring(ua.indexOf('/', ua.indexOf('gecko/')+6)+1));
	else if(this.isMozilla) this.versionMinor=parseFloat(ua.substring(ua.indexOf('rv:')+3));
	else if(this.isIE && this.versionMinor>=4) this.versionMinor=parseFloat(ua.substring(ua.indexOf('msie ')+5));
	else if(this.isSafari) this.versionMinor=parseFloat(ua.substring(ua.lastIndexOf('safari/')+7));

	this.versionMajor=parseInt(this.versionMinor); 

	this.isDOM1=(document.getElementById);
	this.isDOM2Event=(document.addEventListener && document.removeEventListener);

	this.mode=document.compatMode?document.compatMode:'BackCompat';

	this.isWin=(ua.indexOf('win')!=-1);
	this.isMac=(ua.indexOf('mac')!=-1);

	this.isNS6x=(this.isNS && this.versionMajor==6);
	this.isNS6up=(this.isNS && this.versionMajor>= 6);
	this.isNS7x=(this.isNS && this.versionMajor==7);
	this.isNS7up=(this.isNS && this.versionMajor>= 7);
	this.isIE5x=(this.isIE && this.versionMajor==5);
	this.isIE55=(this.isIE && this.versionMinor==5.5);
	this.isIE5up=(this.isIE && this.versionMajor>= 5);
	this.isIE6x=(this.isIE && this.versionMajor==6);
	this.isIE6up=(this.isIE && this.versionMajor>= 6);
}
var browser=new BrowserDetect();



function Is() {
	    agent  = navigator.userAgent.toLowerCase();
	    this.major = parseInt(navigator.appVersion);
	    this.minor = parseFloat(navigator.appVersion);
	    this.ns    = ((agent.indexOf('mozilla')   !=   -1) && ((agent.indexOf('spoofer')   ==   -1) && (agent.indexOf('compatible') ==   -1)));
	    this.ns4   = (this.ns && (this.major      ==    4));
	    this.ns6   = (this.ns && (this.major      >=    5));
	    this.ie    = (agent.indexOf("msie")       !=   -1);
	    this.ie3   = (this.ie && (this.major      < 4));
	    this.ie4   = (this.ie && (this.major      ==    4) && (agent.indexOf("msie 4.0")   !=   -1));
	    this.ie5   = (this.ie && (this.major      ==    4) && (agent.indexOf("msie 5.0")   !=   -1));
	    this.ie55  = (this.ie && (this.major      ==    4) && (agent.indexOf("msie 5.5")   !=   -1));
	    this.ie6  = (this.ie && (agent.indexOf("msie 6.0")!=-1) );
}
var is = new Is();



function goster_beni(beni,oni) {
	oni.style.display='none';
	beni.style.display='block';
}



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()*64;
    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" />');
		}
	}
}



