//																Goto Login
//______________________________________________________________________________


function openMainSwf(){
	window.open(appHp +"mainSwf.php","Fabio Colella - Official Site","width=950,height=590,toolbar=no,directories=no,menubar=no,scrollbars=no,resizable=no");
}

function openNewsLetter(){
	window.open(appHp +"newsletter.php","OfficialNewsLetter","width=500,height=350,toolbar=no,directories=no,menubar=no,scrollbars=no,resizable=no");
}


function resizeWindowTo(w,h) {
 if (parseInt(navigator.appVersion)>3) {
   if (navigator.appName=="Netscape") {
    top.outerWidth=w;
    top.outerHeight=h;
   }
   else top.resizeTo(w,h);
 }
}


function nlGo(){
	var ok=true;
	
	if( document.getElementById('eml').value.length < 7 ){
		document.getElementById('eml').focus();	
		ok=false;
	}
	
	if(ok){
		document.forms['nl'].submit();
	}else{
		alert('Inserisci almeno un indirizzo email valido.');
	}	
	
}








function skvrGotoLogin(){
	location.href= appHp +'login.php';
}

function skvrGotoHome(){
	location.href= appHp;
}


/**
 * Funzione di controllo e invio del form di login
 */
function goLogin(){
	var ok=true;
	
	document.getElementById('emlL').style.color="black";
	document.getElementById('pwdL').style.color="black";
	
	if( document.getElementById('eml').value.length < 7 ){
		document.getElementById('eml').focus();	
		document.getElementById('emlL').style.color="red";
		ok=false;
	}
	
	if( document.getElementById('pwd').value.length < 1 ){
		document.getElementById('pwd').focus();		
		document.getElementById('pwdL').style.color="red";
		ok=false;
	}

	
	if(ok){
		document.forms['skvrLogin'].submit();
	}
}









function testAjax(){
	// redirect � il parametro della funzione che contiene l'id del div da aggiornare sulla pagina chiamante... 
	sylarMakeAjaxRequest ("2.php", testAjaxResult, "redirect");	
}
 
 
 
 
function testAjaxResult(ajax_request, divID) {
	//alert('Test Chiamata Ajax!');
	if (ajax_request.readyState == 4) {
		if (ajax_request.status == 200) {
			var sText = ajax_request.responseText;
			
			document.getElementById(divID).innerHTML = sText;
			
			
			
		} else {
			sylarNotifyAjaxError('There was a problem with the Ajax request.');
		}
	}
} 



//																String Booster
//______________________________________________________________________________


// Funzioni per il potenziamento di explorer con le stringhe

function inizializeStringBuffer(){
	return new Array();
}
function addBuffer(aBuffer, sText) {
 aBuffer[aBuffer.length] = sText;
}
function getStringFromBuffer(aBuffer){
	return aBuffer.join("");
}

// Esempio
// aBS = inizializeStringBuffer();
// addBuffer(aBS, "pippo");
// addBuffer(aBS, "pluto");
// alert( getStringFromBuffer(aBS) );





