function clientWidth() {
  var myWidth = 0;
  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    myWidth = window.innerWidth;
  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    //IE 6+ in 'standards compliant mode'
    myWidth = document.documentElement.clientWidth;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    //IE 4 compatible
    myWidth = document.body.clientWidth;
  }
  return myWidth;
}

function clientHeight() {
  var myHeight = 0;
  if(typeof( window.innerWidth ) == 'number'){
    myHeight = top.window.innerHeight; //Non-IE
  }else if( document.documentElement && (document.documentElement.clientWidth || document.documentElement.clientHeight)){
    myHeight = top.document.documentElement.clientHeight; //IE 6+ in standards compliant mode
  }else if(document.body && ( document.body.clientWidth || document.body.clientHeight)) {
    myHeight = top.document.body.clientHeight; //IE 4 compatible
  }
  return myHeight;
}

//var swidth = clientWidth()-16;
function resizeBck(){
  var nwidth = clientWidth();
  var nheight = clientHeight();
	if(nwidth>0 && nheight>0){
		diff = nwidth-1900;
		//alert(nwidth+'-'+swidth+'-'+diff);
	  var w = (nwidth-1000)/2;
		document.getElementById('background').style.left = w+'px';
	  /*var h = (clientHeight()-700)/2;
	  if(h>0){
			document.getElementById('background').style.top = h+'px';
		}else{
			document.getElementById('background').style.top = '0';
		}*/
	}
	document.body.style.backgroundPosition=(diff/2)+'px top';
	//alert(Math.round(w)+' / '+clientWidth()+' / '+document.getElementById('background').style.width+' / '+Math.round(h)+' / '+clientHeight()+' / '+document.getElementById('background').style.height);
}
window.onresize = function(){ resizeBck() };

function sh(elem,act){
  if(act=='block' || act=='none')
		document.getElementById(elem).style.display = act;
  else if(act=='visible' || act=='hidden')
		document.getElementById(elem).style.visibility = act;
}

function closeAll(){
  //for(i in allDivs) document.getElementById(allDivs[i]).style.visibility='hidden';
}

var browser 		= navigator.userAgent.toLowerCase();
var isIE 				= ((browser.indexOf( "msie" ) != -1) && (browser.indexOf( "opera" ) == -1) && (browser.indexOf( "webtv" ) == -1));

/* INTEGRATION FLASH */
function flash(url, alttext, w, h, classe){
	if(!isIE){
			document.write('<object style="width: '+w+'px; height: '+h+'px" type="application/x-shockwave-flash" data="'+url+'" class="'+classe+'">');
	}else{
			document.write('<object style="width: '+w+'px; height: '+h+'px" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" class="'+classe+'"');
			document.write('  codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0">');
			document.write('  <param name="movie" value="'+url+'">');
	}
	document.write('<param name="loop" value="true">');
	document.write('<param name="menu" value="false">');
  document.write('<param name="wmode" value="transparent">');
  document.write('<param name="width" value="'+w+'">');
  document.write('<param name="height" value="'+h+'">');
	document.write('<p>'+alttext+'</p>');
	document.write('</object>');
}

