
function is_flash() {
	if (!fdetect()) {
//		top.location.href='oldflash.html';
	}
}

function fdetect() {
	var flashinstalled = 0;
	var flashversion = 0;
	if (navigator.plugins && navigator.plugins.length) {
		x = navigator.plugins["Shockwave Flash"];
		if (x) {
			flashinstalled = 2;
			if (x.description) {
				y = x.description;
				flashversion = y.charAt(y.indexOf('.')-1);
			}
		}
		else {
			flashinstalled = 1;
		}
		
		if (navigator.plugins["Shockwave Flash 2.0"]) {
			flashinstalled = 2;
			flashversion = 2;
		}
	}
	else if (navigator.mimeTypes && navigator.mimeTypes.length) {
		x = navigator.mimeTypes['application/x-shockwave-flash'];
		if (x && x.enabledPlugin)
			flashinstalled = 2;
		else
			flashinstalled = 1;
	}
	
	if (flashinstalled == 2) {
		return true;
	}
	else {
		return false;
	}
}

var DHTML = (document.getElementById || document.all || document.layers);

function inviboss(flag)
{
	if (!DHTML) return;
	var x = new getObj('boss');
	x.style.visibility = (flag) ? 'hidden' : 'visible'
}

function invipromo(flag)
{
	if (!DHTML) return;
	var x = new getObj('promo');
	x.style.visibility = (flag) ? 'hidden' : 'visible'
}

function getObj(name)
{
  if (document.getElementById)
  {
  	this.obj = document.getElementById(name);
	this.style = document.getElementById(name).style;
  }
  else if (document.all)
  {
	this.obj = document.all[name];
	this.style = document.all[name].style;
  }
  else if (document.layers)
  {
   	this.obj = document.layers[name];
   	this.style = document.layers[name];
  }
}

menu_status = new Array();

function showHide(theid){
    if (document.getElementById) {
    var switch_id = document.getElementById(theid);

        if(menu_status[theid] != 'show') {
           switch_id.className = 'show';
           menu_status[theid] = 'show';
        }else{
           switch_id.className = 'hide';
           menu_status[theid] = 'hide';
        }
    }
}


var bo_ns_id = 0;

function startIeFix(){
	if(isIE()){
		document.write('<noscript id="bo_ns_id_' + bo_ns_id + '">');
	}
}

function endIeFix(){
	if(isIE()){
		var theObject = document.getElementById("bo_ns_id_" + bo_ns_id++);
		var theNoScript = theObject.innerHTML;
		document.write(theNoScript);
	}
}

function isIE(){
	var strBrowser = navigator.userAgent.toLowerCase();
	if(strBrowser.indexOf("msie") > -1 && strBrowser.indexOf("mac") < 0){
		return true;
	}else{
		return false;
	}
}


function imageAblak(url) {
	var iw = window.open(url,'imagewindow','width=100,height=100,resizable=yes,toolbar=no,location=no,menubar=no,scrollbars=no');
	iw.focus();
}


function my_chInner(objid,content) {
	var obj = document.getElementById(objid);
	if (obj) {
		obj.innerHTML=content;
	}
}


function init() {
    var x=1;
}

function setDisplay(objid,dsp) {
	var obj = document.getElementById(objid);
	if (obj) {
		obj.style.display=dsp;
	}
}

function getObj(name) {
  if (document.getElementById) {
	this.obj = document.getElementById(name);
	this.style = document.getElementById(name).style;
  } else if (document.all) {
    this.obj = document.all[name];
	this.style = document.all[name].style;
  } else if (document.layers) {
	this.obj = document.layers[name];
	this.style = document.layers[name];
  }
}

function menuhover(objid,p) {
    var o = new getObj(objid);
    
    if (p == 1) {
	o.obj.className = 'menuitemH';
    }
    else {
	o.obj.className = 'menuitem';
    }
}

function changeClass(objid,classname) {
    var o = new getObj(objid);
    o.obj.className = classname;
}
