var url = window.location;
var title = document.title;
var wwwroot = "../";

function wopmove(id)
{
if(id == "facebook")
	window.open("http://www.facebook.com/sharer.php?u="+url+"&t="+title);
if(id == "delicious")
	window.open("http://del.icio.us/post?url="+url+"&title="+title+"&notes="+title);
if(id == "stumbleupon")
	window.open("http://www.stumbleupon.com/submit?url="+url+"&title="+title);
if(id == "google")
	window.open("http://www.google.com/bookmarks/mark?op=add&bkmk="+url+"&title="+title+"&labels="+sitename);
if(id == "yahoo")
	window.open("http://myweb2.search.yahoo.com/myresults/bookmarklet?u="+url+"&t="+title);
if(id == "myspace")
	window.open("http://www.myspace.com/index.cfm?fuseaction=postto&t="+ title +"&u=" + url);
if(id == "livespace")
	window.open("https://skydrive.live.com/sharefavorite.aspx/.SharedFavorites??&url="+url+"&title="+title);
if(id == "blogger")
	window.open();
}

function showDivFromTab(param){
	for(i=1; i<5; i++){
		if(param == i){
			document.getElementById('menu' + i).style.display = 'block';
			document.getElementById('tab' + i).className = 'tabOn';
			document.getElementById('child_menu' + i).style.display = 'block';
		}else{
			document.getElementById('menu' + i).style.display = 'none';
			document.getElementById('tab' + i).className = 'tabOff';
			document.getElementById('child_menu' + i).style.display = 'none';
		}
	}
}

function versioneStampabile() {
    var str = "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"><html><head><title>" + document.title + "</title>" + "<link href='" + wwwroot + "style/css.css' rel='stylesheet' type='text/css'>" + "<link href='" + wwwroot + "style/custom-styles.css' rel='stylesheet' type='text/css'>" + "<style type='text/css'>BODY,HTML {margin:10;background:#FFF; text-align:left}</style>" + "</head><body>" + "<div class='logo'><a href='pagina.aspx?ID=Home&L=IT'><img src='../contenuti/img/nelsen-logo.png' width='106' height='167' align='Nelsen' /></a></div><div style='width:680px;padding-top:180px'><br>" + MM_findObj("LayoutTemplate_panelcx").innerHTML + "<br></div>" + "</body></html>";
    win2 = open();
    win2.document.open();
    win2.document.write(str);
    win2.print();
    win2.document.close();
}

function popupNonLoggato() {
    var str = "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"><html><head><title>Utente non loggato</title>" + "<style type='text/css'>BODY,HTML {margin:10;background:#FFF; text-align:center}</style></head><body><div style='width:200px;padding-top:40px;font-size:13px;font-weight:bold;color:#d17f7f;'><br><span>Attenzione!<br>Devi essere loggato per poter votare!</span><br></div></body></html>";

    var win2 = document.open("","","width=400,height=200");
    win2.document.write(str);
    win2.document.close();
}

