var intervalHelpBox;
function openCloseHelpBox( openbox ){
setBoxPos();
	if(openbox == true ){
		Effect.Fade("cs_mssg_box2",{duration:.5});
		Effect.Appear("cs_mssg_box",{duration:.9});
		setClose( '0'	);
	}else{
		Effect.Fade("cs_mssg_box",{duration:.5});
		Effect.Appear("cs_mssg_box2",{duration:.2});
		setClose( '1' );
	}
}
function setBoxPos(){
		var w = getW();
		getElementObject("cs_mssg_box").style.left = ( w > 0 ? w / 2 - 200 : 200 );
		getElementObject("cs_mssg_box2").style.left = ( w > 0 ? w / 2 - 200 : 200 );

}
function runBoxOnDelay(){
		openCloseHelpBox( true );
		clearInterval( intervalHelpBox );
}
function getHTTPObject() {   
  var xmlhttp;
  /*@cc_on
  @if (@_jscript_version >= 5)
    try {
      xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
    } catch (e) {
      try {
        xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
      } catch (E) {
        xmlhttp = false;
      }
    }
  @else
  xmlhttp = false;
  @end @*/
  if (!xmlhttp && typeof XMLHttpRequest != 'undefined') {
    try {
      xmlhttp = new XMLHttpRequest();
    } catch (e) {
      xmlhttp = false;
    }
  }
  return xmlhttp;
}
var httpQF;
function setClose( openClose ){
		  var thisURL = 'index.php?ajax=1&hidebox=' + openClose; 
		  httpQF = getHTTPObject();
		  httpQF.open("GET", thisURL, true);
		  httpQF.onreadystatechange = handleHttpResponse_setClose;
		  httpQF.send(null);
}
function handleHttpResponse_setClose(){}
function getW() {
  var myWidth = 0;
  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    myWidth = window.innerWidth;
  } else if( document.documentElement && ( document.documentElement.clientWidth ) ) {
    //IE 6+ in 'standards compliant mode'
    myWidth = document.documentElement.clientWidth;
  } else if( document.body && ( document.body.clientWidth ) ) {
    //IE 4 compatible
    myWidth = document.body.clientWidth;
  }
	return myWidth;
}
function getElementObject(eid) {
/* this only works on ie */
 
	if (document.all) {
  
	  return document.all[eid];
	}
	if (document.getElementById) {
 
		return document.getElementById(eid);
	}
	if(document.layers)	 //NN4+
	{
	 return document.layers[div_id];
	}		
}
function getReadyHTTP( rs ){for( var ak in aHTTP){if( aHTTP[ak].readyState == rs )return ak;}return false;}

function getElementObject(eid) {if (document.all){return document.all[eid];}if (document.getElementById) {return document.getElementById(eid);}if(document.layers){return document.layers[div_id];}}

function getHTTPObject() { var xmlhttp; /*@cc_on @if (@_jscript_version >= 5)try{xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");} catch (e) {try{xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");} catch (E) {xmlhttp = false;}} @else xmlhttp = false; @end @*/ if (!xmlhttp && typeof XMLHttpRequest != 'undefined') {try {xmlhttp = new XMLHttpRequest();} catch (e){xmlhttp = false;}}return xmlhttp;}