var P = {
  V: '0.0.1_alpha1',
  B: {
    IE:     !!(window.attachEvent && !window.opera),
	Opera:  !!window.opera,
	Gecko:  navigator.userAgent.indexOf('Gecko') > -1 && navigator.userAgent.indexOf('KHTML') == -1
  }
};

////////////////////////////////////////////////////////////////////////////////
var A = new Object;
var A = {
	waitid: '',
	returnid: '',
	daily: '1000',
	loading: 'loadding...'
}
///////////////////////////////////////////////////////////////////////////////

////////////////////////////////////

/////////////////////////////////

////////////////////////////////

///////////////////////////////////

/////////////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////////////

/////////////////////////////////////////////////////////////////////////////////
function G() {
	var elements = new Array();
	var arr = arguments.length;
	for (var i = 0; i < arr; i++) {
    var element = arguments[i];
		if (typeof element == 'string') element = document.getElementById(element);
		if (arr == 1) return element;
	    elements.push(element);
	}
return elements;
}
/////////////////////////////////////////////////////////////////////////////////
function N(objid, msg, revtype){
	//innerHTML  objid,msg
	var msg = msg;
	//if (msg =='' || msg == undefined || typeof(msg) == 'undefined'){
		//D(objid,'none');
		//msg = '';
	//}
	if (revtype =='' || revtype == undefined || typeof(revtype) == 'undefined' || revtype == 'HTML'){
		G(objid).innerHTML = msg ;
	}else{
		G(objid).value = msg ;
	}
	
}
////////////////////////////////////////////////////////////////////////////////
function D(objid,dtype){
	if (dtype == 'block'){
		G(objid).style.display = 'block';
	}else if (dtype=='none'){
		G(objid).style.display = 'none';
	}else {
		G(objid).style.display = (G(objid).style.display == '' || G(objid).style.display == 'block') ? 'none' : 'block';
	}
}
////////////////////////////////////////////////////////////////////////////////
function CC(objid,classname){
	G(objid).className = classname;
}
////////////////////////////////////////////////////////////
function $E(the_message){
			alert("|type=" + typeof the_message + "\n\n|data=" + the_message);
}
///////////////////////////////////////////////////////////////////////////////
function F(objid,opacity){
	if (opacity>100 || opacity<10){
		opacity = 30;
	}
	if (P.B.IE == true){
		G(objid).style.filter = 'alpha(opacity=' + opacity + ')'; //IE
	}else if(P.B.Opera == true){
		G(objid).style.opacity = (opacity/100); //OPERA AND CSS 3
	}else if(P.B.Gecko == true){
		G(objid).style.MozOpacity = (opacity/100);//FX
	}else{
		return false;
	}
}