// JavaScript Document

function goToAttivazione (newurl)
{

	//serve percè la pagina acquista_attiva.htm sia in https
	//alert("la pagina di attivazione è in https");
	//return false

	var OldsHost = window.location.host;
	//alert(OldsHost);

	if( OldsHost.indexOf("1.71.4.114")!=-1 ){
    	var NewsHost = "1.71.4.114/legalmail2009/legalmail2009"
	}
	if( OldsHost.indexOf("legmsv")!=-1 ){
    	var NewsHost = "legmsv.intra.infocert.it"
	}
	if( OldsHost.indexOf("legalmail")!=-1 ) {
		var NewsHost = "www.legalmail.it"
	}
	if( OldsHost.indexOf("webmailsv")!=-1 ) {
		var NewsHost = "webmailsv.intra.infocert.it"
	}
	if( OldsHost.indexOf("webmail")!=-1 ) {
		var NewsHost = "webmail.infocert.it"
	}
	
    /*if( OldsHost.indexOf("www.firma.infocert.it")!=-1 ) {
		var NewsHost = "webtelemaco.infocamere.it"
	}*/

//	var newurl = "https://" + NewsHost + "/cara/jplug/rinnsc.jsp";
	var newurl = "https://" + NewsHost + "/acquista_attiva.htm" ;	
	
	//alert(newurl);
 	parent.location.replace(newurl);
	return nerwurl

}
function goToRinnova (newurl)
{

	//serve percè la pagina acquista_rinnova.htm sia in https
	//alert("la pagina di attivazione è in https");
	//return false

	var OldsHost = window.location.host;
	//alert(OldsHost);

	if( OldsHost.indexOf("1.71.4.114")!=-1 ){
    	var NewsHost = "1.71.4.114/legalmail2009/legalmail2009"
	}
	if( OldsHost.indexOf("legmsv")!=-1 ){
    	var NewsHost = "legmsv.intra.infocert.it"
	}
	if( OldsHost.indexOf("legalmail")!=-1 ) {
		var NewsHost = "www.legalmail.it"
	}
	if( OldsHost.indexOf("webmailsv")!=-1 ) {
		var NewsHost = "webmailsv.intra.infocert.it"
	}
	if( OldsHost.indexOf("webmail")!=-1 ) {
		var NewsHost = "webmail.infocert.it"
	}
	
    /*if( OldsHost.indexOf("www.firma.infocert.it")!=-1 ) {
		var NewsHost = "webtelemaco.infocamere.it"
	}*/

//	var newurl = "https://" + NewsHost + "/cara/jplug/rinnsc.jsp";
	var newurl = "https://" + NewsHost + "/acquista_rinnova.htm" ;	
	
	//alert(newurl);
 	parent.location.replace(newurl);
	return nerwurl

}

function goToFormAttivazione (newurl)
{

	//serve per richiamare il form di attivazioe nell'iframe attivazione e perché i link funzionino sia in sviluppo che in produzione
	//alert("la pagina di attivazione è in https");
	//return false

	var OldsHost = window.location.host;
	//alert(OldsHost);

	if( OldsHost.indexOf("1.71.4.114")!=-1 ){
    	var NewsHost = "webmailsv.intra.infocert.it/relm.webreg"
	}
	if( OldsHost.indexOf("legmsv")!=-1 ){
    	var NewsHost = "webmailsv.intra.infocert.it/relm.webreg"
	}
	if( OldsHost.indexOf("legalmail")!=-1 ) {
		var NewsHost = "webmail.infocert.it/relm.webreg"
	}
	if( OldsHost.indexOf("webmailsv")!=-1 ) {
		var NewsHost = "webmailsv.intra.infocert.it/relm.webreg"
	}
	if( OldsHost.indexOf("webmail")!=-1 ) {
		var NewsHost = "webmail.infocert.it/relm.webreg"
	}
	
    /*if( OldsHost.indexOf("www.firma.infocert.it")!=-1 ) {
		var NewsHost = "webtelemaco.infocamere.it"
	}*/

//	var newurl = "https://" + NewsHost + "/cara/jplug/rinnsc.jsp";
	var newurl = "https://" + NewsHost + "/pp_richiesta.jsp" ;	
	
	//alert(newurl);
 	//parent.iframe['attivazione'].location.replace(newurl);
	//document.all['attivazione'].src = (newurl);
	document.getElementById('attivazione').src = (newurl);

	

}
function goToFormRinnova (newurl)
{

	//serve per richiamare il form di rinnovo nell'iframe attivazione e perché i link funzionino sia in sviluppo che in produzione
	//alert("la pagina di rinnovo è in https");
	//return false

	var OldsHost = window.location.host;
	//alert(OldsHost);

	if( OldsHost.indexOf("1.71.4.114")!=-1 ){
    	var NewsHost = "webmailsv.intra.infocert.it/relm.webreg/rinnovo.jsp"
	}
	if( OldsHost.indexOf("legmsv")!=-1 ){
    	var NewsHost = "webmailsv.intra.infocert.it/relm.webreg/rinnovo.jsp"
	}
	if( OldsHost.indexOf("legalmail")!=-1 ) {
		var NewsHost = "webmail.infocert.it/relm.webreg/rinnovo.jsp"
	}
	
	
    /*if( OldsHost.indexOf("www.firma.infocert.it")!=-1 ) {
		var NewsHost = "webtelemaco.infocamere.it"
	}*/

//	var newurl = "https://" + NewsHost + "/cara/jplug/rinnsc.jsp";
	var newurl = "https://" + NewsHost  ;	
	
	//alert(newurl);
 	//parent.iframe['attivazione'].location.replace(newurl);
	//document.all['attivazione'].src = (newurl);
	document.getElementById('rinnova').src = (newurl);

	

}
function goToRiprendi (newurl)
{

	var OldsHost = window.location.host;

	if( OldsHost.indexOf("1.71.4.114")!=-1 ){
    	var NewsHost = "webmailsv.intra.infocert.it/relm.webreg/riprendi_attivazione.jsp"
	}
	if( OldsHost.indexOf("legmsv")!=-1 ){
    	var NewsHost = "webmailsv.intra.infocert.it/relm.webreg/riprendi_attivazione.jsp"
	}
	if( OldsHost.indexOf("legalmail")!=-1 ) {
		var NewsHost = "https://legalmail.infocert.it/relm.webreg/riprendi_attivazione.jsp "
	}
	
	
	var newurl = "https://" + NewsHost  ;	
	
	document.getElementById('riprendi').src = (newurl);

	

}

function goToVerificaCasella (newurl)
{

	var OldsHost = window.location.host;

	if( OldsHost.indexOf("1.71.4.114")!=-1 ){
    	var NewsHost = "webmailsv.intra.infocert.it/relm.webreg/verificaCasella2.jsp"
	}
	if( OldsHost.indexOf("legmsv")!=-1 ){
    	var NewsHost = "webmailsv.intra.infocert.it/relm.webreg/verificaCasella2.jsp"
	}
	if( OldsHost.indexOf("legalmail")!=-1 ) {
		var NewsHost = "webmail.infocert.it/relm.webreg/verificaCasella2.jsp"
	}
	
	
	var newurl = "https://" + NewsHost  ;	
	
	document.getElementById('verificacasella').src = (newurl);

	

}
function goToFormPromonuovesocieta (newurl)
{

	//serve per richiamare il form di attivazioe nell'iframe attivazione e perché i link funzionino sia in sviluppo che in produzione. Per la promo nuove società non ancora iscritte al RI
	//alert("la pagina di attivazione è in https");
	//return false

	var OldsHost = window.location.host;
	//alert(OldsHost);

	if( OldsHost.indexOf("1.71.4.114")!=-1 ){
    	var NewsHost = "webmailsv.intra.infocert.it/relm.webreg"
	}
	if( OldsHost.indexOf("legmsv")!=-1 ){
    	var NewsHost = "webmailsv.intra.infocert.it/relm.webreg"
	}
	if( OldsHost.indexOf("legalmail")!=-1 ) {
		var NewsHost = "webmail.infocert.it/relm.webreg"
	}
	if( OldsHost.indexOf("webmailsv")!=-1 ) {
		var NewsHost = "webmailsv.intra.infocert.it/relm.webreg"
	}
	if( OldsHost.indexOf("webmail")!=-1 ) {
		var NewsHost = "webmail.infocert.it/relm.webreg"
	}
	
    /*if( OldsHost.indexOf("www.firma.infocert.it")!=-1 ) {
		var NewsHost = "webtelemaco.infocamere.it"
	}*/

//	var newurl = "https://" + NewsHost + "/cara/jplug/rinnsc.jsp";
	var newurl = "https://" + NewsHost + "/pp_richiesta_promo.jsp" ;	
	
	//alert(newurl);
 	//parent.iframe['attivazione'].location.replace(newurl);
	//document.all['attivazione'].src = (newurl);
	document.getElementById('attivazione').src = (newurl);

	

}



function goToFormNotai (newurl)
{

	//serve per richiamare il form di attivazioe nell'iframe attivazione e perché i link funzionino sia in sviluppo che in produzione. Per la promo nuove società non ancora iscritte al RI
	//alert("la pagina di attivazione è in https");
	//return false

	var OldsHost = window.location.host;
	//alert(OldsHost);

	if( OldsHost.indexOf("1.71.4.114")!=-1 ){
    	var NewsHost = "webmailsv.intra.infocert.it/relm.webreg"
	}
	if( OldsHost.indexOf("legmsv")!=-1 ){
    	var NewsHost = "webmailsv.intra.infocert.it/relm.webreg"
	}
	if( OldsHost.indexOf("legalmail")!=-1 ) {
		var NewsHost = "webmail.infocert.it/relm.webreg"
	}
	if( OldsHost.indexOf("webmailsv")!=-1 ) {
		var NewsHost = "webmailsv.intra.infocert.it/relm.webreg"
	}
	if( OldsHost.indexOf("webmail")!=-1 ) {
		var NewsHost = "webmail.infocert.it/relm.webreg"
	}
	
    /*if( OldsHost.indexOf("www.firma.infocert.it")!=-1 ) {
		var NewsHost = "webtelemaco.infocamere.it"
	}*/

//	var newurl = "https://" + NewsHost + "/cara/jplug/rinnsc.jsp";
	var newurl = "https://" + NewsHost + "/richiesta_notai.jsp" ;	
	
	//alert(newurl);
 	//parent.iframe['attivazione'].location.replace(newurl);
	//document.all['attivazione'].src = (newurl);
	document.getElementById('notai').src = (newurl);

	

}


function goToFormCFNotai (newurl)
{

	//serve per richiamare il form di attivazioe nell'iframe attivazione e perché i link funzionino sia in sviluppo che in produzione. Per la promo nuove società non ancora iscritte al RI
	//alert("la pagina di attivazione è in https");
	//return false
	
	var OldsHost = window.location.host;
	//alert(OldsHost);

	if( OldsHost.indexOf("1.71.4.114")!=-1 ){
    	var NewsHost = "webmailsv.intra.infocert.it/relm.webreg"
	}
	if( OldsHost.indexOf("legmsv")!=-1 ){
    	var NewsHost = "webmailsv.intra.infocert.it/relm.webreg"
	}
	if( OldsHost.indexOf("legalmail")!=-1 ) {
		var NewsHost = "webmail.infocert.it/relm.webreg"
	}
	if( OldsHost.indexOf("webmailsv")!=-1 ) {
		var NewsHost = "webmailsv.intra.infocert.it/relm.webreg"
	}
	if( OldsHost.indexOf("webmail")!=-1 ) {
		var NewsHost = "webmail.infocert.it/relm.webreg"
	}
	
    /*if( OldsHost.indexOf("www.firma.infocert.it")!=-1 ) {
		var NewsHost = "webtelemaco.infocamere.it"
	}*/

//	var newurl = "https://" + NewsHost + "/cara/jplug/rinnsc.jsp";
	var newurl = "https://" + NewsHost + "/login_insertPost.jsp" ;	
	
	//alert(newurl);
 	//parent.iframe['attivazione'].location.replace(newurl);
	//document.all['attivazione'].src = (newurl);
	document.getElementById('cfiscale').src = (newurl);

}


