function createRequestObject() {  
	// find the correct xmlHTTP, works with IE, FF and Opera
	var xmlhttp;
	try {
  	xmlhttp=new ActiveXObject("Msxml2.XMLHTTP");
  }
  catch(e) {
    try {
    	xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
    }
    catch(e) {
    	xmlhttp=null;
    }
  }
  if(!xmlhttp&&typeof XMLHttpRequest!="undefined") {
  	xmlhttp=new XMLHttpRequest();
  }
	return  xmlhttp;
}

function check(element)
 {
 	document.getElementById('message').innerHTML = 
      '<br /><strong>::Please fill all Questions!::</strong>';
 	
 return false;
 }
 	function startLoading() {
	  Element.toggle('mainAreaLoading');
	  Element.hide('mainAreaInternal');
	}
	function finishLoading() {
	  Element.toggle('mainAreaInternal');
	  setTimeout("Effect.toggle('mainAreaLoading');", 1000);
	}
 function loadContent(gid,custid) {
	  startLoading();
	 
	  	new Ajax.Updater('mainAreaInternal', site_url+'/admin/getgroupasso', {method: 'post', postBody:'groupid='+ gid +'&custid='+ custid +''});
	 
	  finishLoading();
	}
	
	
	function startgLoading() {
	  Effect.toggle('groupAreaLoading');
	  Element.hide('groupAreaInternal');
	}
	function finishgLoading() {
	  Effect.toggle('groupAreaInternal');
	  setTimeout("Effect.toggle('groupAreaLoading');", 1000);
	}
 
 function aktivategroup(gid) {
	  startgLoading();
	 
	  	new Ajax.Updater('groupAreaInternal', site_url+'/admin/getgroupinfo', {method: 'post', postBody:'groupid='+ gid +''});
	 
	  finishgLoading();
	}
	
	function startaLoading() {
	  Effect.toggle('groupAreaLoading');
	  Element.hide('groupAreaInternal');
	}
	function finishaLoading() {
	  Effect.toggle('groupAreaInternal');
	  setTimeout("Effect.toggle('groupAreaLoading');", 1000);
	  // Element.hide('groupAreaInternal');
	}
	
	function finishActivate(gid) {
	  startaLoading();
	  	new Ajax.Updater('groupAreaInternal', site_url+'/admin/setgroupaktive', {method: 'post', postBody:'groupid='+ gid +''});
	  finishaLoading();
	}
	
	
	
	function finishtLoading() {
	  //Effect.toggle('fade');
		document.getElementById('fade').style.display='block';
	  setTimeout("Effect.toggle('fade');", 1000);
	}
	function starttLoading() {
	document.getElementById('fade').style.display='block';
	  Effect.toggle('mainAreaLoading');
	 //Element.hide('groupAreaInternal');
	}
	
	
	
	function answeroff(id, val,t1,t2,t3)
	{
		//var res=sendRequest(t1,t2,t3);
			for(i = 1; i <= answer_max; i++) {
				if(i <= val) {
					document.images[id + '_' + i].src = site_url + '/html/images/star_over.gif';
				}  else {
					document.images[id + '_' + i].src = site_url + '/html/images/star_off.gif';
				}	
			}
	}
	function getanswer(id, val,t1,t2,t3){
		
			for(i = 1; i <= val; i++) {
				if (document.getElementById(id+'_'+i)){document.images[id + '_' + i].src = eval("anwer_img.src");}
			}
			return true;
	}
	
	
	
	function getrequested(id, val)
	{
		//var res=sendRequest(t1,t2,t3);
			for(i = 1; i <= answer_max; i++) {
				if(i <= val) {
					document.images[id + '_' + i].src = site_url + '/html/images/star_on.gif';
				}  else {
					document.images[id + '_' + i].src = site_url + '/html/images/star_off.gif';
				}	
			}
	}
	
	
	function togglestab() {

	  	  Effect.toggle('liststab');
	  
	}
	
	
	function togglecarrier() {
	  Effect.toggle('listcarrier');
	  
	}
	function toggleconf() {
	  Effect.toggle('listconflict');
	  
	}
	
	function toggleGroups(id)
	{
	Effect.toggle('r'+id);
	
	}
	
	
