$(document).ready(function(){	
			$("#slider").easySlider({
				auto: true,
				continuous: false 
			});
		});	

		var xmlhttp = false;

		//Check if we are using IE.
		try {
		//If the javascript version is greater than 5.
		xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
		//If not, then use the older active x object.
		try {
		//If we are using IE.
		xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
		} catch (E) {
		//Else we must be using a non-IE browser.
		xmlhttp = false;
		}
		}
		//If we are using a non-IE browser, create a JavaScript instance of the object.
		if (!xmlhttp && typeof XMLHttpRequest != 'undefined') {
		xmlhttp = new XMLHttpRequest();
		}
		
		
function dologin(name,email,siteurl){
			//alert('test');
			var serverPage=siteurl+"/templates/client_trust/newsletter.php";
			serverPage+="?name="+name+"&email="+email;
			//alert(serverPage);
			xmlhttp.open("GET", serverPage);
			
			//AJAX does not allow cross-domain references
			var obj=document.getElementById('tdError1');
			 xmlhttp.onreadystatechange = function() {
				 		//alert(xmlhttp.status);
		                if (xmlhttp.readyState == 4 && xmlhttp.status == 200) { //alert(xmlhttp.responseText);

		                obj.innerHTML = xmlhttp.responseText;
								
		                        }
		                }
		        xmlhttp.send(null);
			}

		function clearValue(element, message) {
			if (element.value==message ){
					element.value="";
			}
		}

		function resetValue(element, message){
			if (element.value=="" ) {
				element.value=message;
			}
		}
		
		function test(){
			if (document.login.user.value!="" && document.login.pass.value!=""){
				alert ("Δεν είστε εξουσιοδοτημένος χρήστης");
			}
			else
			alert ("Εισάγετε τα εξουσιοδοτημένα στοιχεία σας");
			}


		
		var xmlhttp = false;

		//Check if we are using IE.
		try {
		//If the javascript version is greater than 5.
		xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
		//If not, then use the older active x object.
		try {
		//If we are using IE.
		xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
		} catch (E) {
		//Else we must be using a non-IE browser.
		xmlhttp = false;
		}
		}
		//If we are using a non-IE browser, create a JavaScript instance of the object.
		if (!xmlhttp && typeof XMLHttpRequest != 'undefined') {
		xmlhttp = new XMLHttpRequest();
		}
		
		
function dologin1(user,pass,siteurl){
			//alert ("test");
			var serverPage=siteurl+"/templates/client_trust/support_login.php";
			//alert ("test");
			//alert(pass);
			serverPage+="?user="+user+"&pass="+pass;
			//alert ("test1"); 
			//alert(serverPage);
			xmlhttp.open("GET", serverPage);
			
			//AJAX does not allow cross-domain references
			var obj=document.getElementById('tdError');
			 xmlhttp.onreadystatechange = function() {
				 		//alert(xmlhttp.status);
		                if (xmlhttp.readyState == 4 && xmlhttp.status == 200) { 
						
						//alert(xmlhttp.responseText);


		                if (xmlhttp.responseText.trim()=="redirect1"){
							window.location ='/support/admin.php';
						}	
		                
		                if (xmlhttp.responseText.trim()=="redirect"){
							window.location ='/support/index.php';
							}
						
						
						else{
		                obj.innerHTML = xmlhttp.responseText;
		                
						}	
		                        }
		                }
		        xmlhttp.send(null);
			}
		
