function Common(){};

Common.prototype.getXMLHttp = function() {
    var xmlhttp;
    try {
    	xmlhttp = new XMLHttpRequest();
    } catch(e) {
    	try {
    		xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
    	} catch(e) {
    		try {
    			xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
    		} catch(e) {
    			xmlhttp = null;
    		}
    	}
    }
    return xmlhttp;
};

Common.prototype.getData = function(url,syncType) {

	if (url == null) return null;

    var xmlhttp = this.getXMLHttp();
    if (!xmlhttp) return null;

    xmlhttp.open("GET", encodeURI(url), syncType);
    if ( typeof(xmlhttp.setRequestHeader) != "undefined" ) {
		xmlhttp.setRequestHeader("Referer", location.href);
	}
		
	xmlhttp.onreadystatechange=function(){
	    if (xmlhttp.readyState == 4 ) {
	        eval(xmlhttp.responseText);
		}
	}
    xmlhttp.send(null);
};

Common.prototype.createParamForForm=function(f){
	var gnepph = new mapionFuncs.text.ParamHashForUC();
	var elem = f.elements;
	for(i=0; i<elem.length; i++){
		if( !elem[i].value ) continue;
		if( elem[i].id.indexOf("chk", 0) > -1 ) continue;
		if( !elem[i].checked ) continue;
		gnepph.putForUC(elem[i].getAttribute("id"), elem[i].value, gnepph.OBSCURITY);
	};
	return gnepph;
};