// correzioni al foglio di stile per browser handicappati

var percorso='http://www.marok.org/Buco/themes/vanilla/styles/marok/';

// Explorer e Opera

if (window.opera||document.all) {var pospuls="2"} else {var pospuls="-6"};

// Explorer

if (document.all && !window.opera) {
	document.write('<style type="text/css">');
	document.write('.User.Name {overflow: visible !important; overflow-x:hidden}');
	document.write('ul.fdtablePaginater, ul.fdtablePaginater *, ul.fdtablePaginater * *, ul.fdtablePaginater * * * {background:#eef0ff !important; border:1px solid black; margin:0px; padding:0px; border:none !important; display:inline !important; font-size:12px; text-align:center}');
	document.write('ul.fdtablePaginater {display:block; width:100px !important; height:20px !important; text-align:left; border:1px dashed black !important; margin-top:10px !important; margin-bottom:20px !important; float:right; text-align:right}');	
	document.write('</style>');
	};
	
// Explorer 4

if (document.all&&!document.getElementById) {
	document.write('<style type="text/css">');
	var session_left=screen.width-320;
	document.write('#Header h1 {line-height:60px}');
	document.write('#Header ul, #Header ul *, #Header ul * * {line-height:10px; font-size:10px; padding:0; margin:0}');
	document.write('#Header ul {text-align:left; background:url(\'http://www.marok.org/Buco/themes/vanilla/styles/marok/bg_header_ul_ie4.png\') left top no-repeat; border:none; color:black; margin:20px !important; padding:0 !important}');
	document.write('#Header ul li.TabOn {background:transparent !important}');
	document.write('#Header ul li a {background:transparent !important}');
	document.write('#Header ul li a:hover {background:yellow !important}');
	document.write('#Panel h1 {padding:20px}');
	document.write('#Panel ul {padding:5px}');
	document.write('#RicercaVeloce {display:none}');
	document.write('#Session {left:'+session_left+'px; padding:3px;}');
	var larghezza_tabella = screen.width-320;
	if (larghezza_tabella>730) {larghezza_tabella=730};
	var larghezza_content = larghezza_tabella;
	document.write('#Content {width:'+larghezza_content+'px; margin-top:180px}');
	document.write('#ContentBody, #memberscontainer {width:'+larghezza_tabella+'px}');	
	document.write('h1 {color:black !important; font-size:12px !important}');
	document.write('.PageInfo, .Bottom {display:none}');
	document.write('.CommentHeader ul, .CommentHeader ul li, .CommentHeader span {background:transparent !important; text-align:left; margin:0px; padding:0px; line-height:20px}');
	document.write('.CommentIcon {width:64px; height:64px; padding-top:5px !important; padding-bottom:0px !important; float:left !important}');
	document.write('</style>');
	};

// Explorer 5
	
if (document.all && !window.opera && navigator.userAgent.indexOf('MSIE 5')>0) {
	document.write('<style type="text/css">');
	document.write('.DiscussionTopic {overflow: visible !important; overflow-x:hidden}');
	var larghezza_tabella = screen.width-320;
	if (larghezza_tabella>730) {larghezza_tabella=730};
	var margine_destro_content = screen.width-130-larghezza_tabella;
	document.write('#Content {margin-right:'+margine_destro_content+'px !important}');
	document.write('#ContentBody, #memberscontainer {width:'+larghezza_tabella+'px}');
	document.write('.DiscussionStarted, .DiscussionComments, .DiscussionLastComment, .DiscussionActive, .DiscussionNew {height:10px !important}');
	document.write('</style>');
	};

// Supplemento per Explorer 5.0

if (document.all && !window.opera && navigator.userAgent.indexOf('MSIE 5')>0 && navigator.userAgent.indexOf('MSIE 5.5')<1) {
	document.write('<style type="text/css">');	
	document.write('.CommentIcon {width:64px !important; height:64px !important; background-position:left top !important; overflow:hidden; vertical-align:top}');
	document.write('.DiscussionType {display:none}');	
	document.write('#Header ul li a {border:1px solid black; padding:3px; margin-left:5px; width:1px}');
	document.write('#Panel ul {padding-top:10px}');
	document.write('.statistike  {padding-top:10px !important}');
	document.write('.inut {padding-top:0px !important}');
	document.write('</style>');
	};

// Explorer 6
	
if (document.all && !window.opera && navigator.userAgent.indexOf('MSIE 6')>0) {
	document.write('<style type="text/css">');	
	document.write('.DiscussionTopic {overflow: visible !important; overflow-x:hidden}');	
	document.write('</style>');
	};
	
// Explorer 7 e 8
	
if (document.all && !window.opera && navigator.userAgent.indexOf('MSIE 7')>0) {
	document.write('<style type="text/css">');	
	document.write('.DiscussionTopic {line-height:26px}');	
	document.write('.Top h1 {text-align:right !important}');
//	document.write('.Bottom {visibility:hidden}');
	document.write('.PageInfo p {visibility:hidden}');
	document.write('</style>');
	};	


// Opera 5 e 6: correzione per vedere gli avatar
// NB: sul 6 ogni tanto si vedono le icone facendo refresh

if
	(window.opera &&
	(navigator.userAgent.toLowerCase().indexOf('pera 5')>0 ||
	navigator.userAgent.toLowerCase().indexOf('pera/5')>0 ||
	navigator.userAgent.toLowerCase().indexOf('pera/6')>0 || 
	navigator.userAgent.toLowerCase().indexOf('pera 6')>0))
	{
	document.write('<style>');	
	document.write('.CommentHeader {margin-top:10px; margin-bottom:60px}');
	document.write('.CommentHeader ul, .CommentHeader ul li, .CommentHeader span {text-align:left; line-height:20px}');
	document.write('.CommentIcon {width:64px; height:64px; padding-top:5px !important; padding-bottom:0px !important; float:left !important}');
	document.write('</style>');	
	}

// Opera7

if
	(window.opera &&
	(navigator.userAgent.toLowerCase().indexOf('pera/7')>0) || 
	(navigator.userAgent.toLowerCase().indexOf('pera 7')>0))
	{document.write('<style>.DiscussionType {float:none !important}</style>')};

// Vecchi Mozilla - precedenti a 1.0

if (
	window.sidebar && 
	(navigator.userAgent.toLowerCase().indexOf('irefox')<1) && 
	(	(navigator.userAgent.toLowerCase().indexOf('1999')>0) || 
		(navigator.userAgent.toLowerCase().indexOf('2000')>0) || 
		(navigator.userAgent.toLowerCase().indexOf('2001')>0) || 
		(navigator.userAgent.toLowerCase().indexOf('2002')>0)
		)) {
	
// Tutti: 
// correzione posizione del #content, che altrimenti parte da zero px e va a finire sotto il titolo	
// correzione posizione dei pulsanti del form di invio messaggio, che altrimenti non funzionano
	
document.write('<style type="text/css">');
document.write('#Content {position:absolute; top:130px; left:235px; right:18px; margin:0px !important}');
document.write('.Submit input {float:none}');
document.write('#CommentBoxController {display:none}');
document.write('</style>');

 
// Tutti i Mozilla precedenti a 0.7 - Correzione avatar sdoppiati e bug minori
// Bug irrisolto: non si vedono le category_icons, perche' non supporta classe di classe.

if (navigator.userAgent.toLowerCase().indexOf('1999')>0 || navigator.userAgent.toLowerCase().indexOf('2000')>0) {
	document.write('<style>');
	document.write('.Bottom {visibility:hidden}');
	document.write('.CommentHeader ul, .CommentHeader ul li, .CommentHeader span {background:transparent !important; text-align:left; margin:0px; padding:0px; line-height:20px}');
	document.write('.CommentIcon {width:64px; height:64px; padding-top:5px !important; padding-bottom:0px !important; float:left !important}');
	document.write('</style>');
 }


// Mozilla 0.5 - Correzione colore di sfondo dei messaggi

if (navigator.userAgent.toLowerCase().indexOf('200010')>0) {
	document.write('<style>');
	document.write('#Comments {background:white}');
	document.write('#Comments li {background:#C8D6EA; border-right:none; border-left:none}');
	document.write('</style>');
 }

// Nota: Mozilla0.8 si pianta - irrisolto
  
// Mozilla 0.9 - png opache, altrimenti le trasparenze diventano di colore nero (?)

if (navigator.userAgent.toLowerCase().indexOf('200105')>0) 
   {document.write('<style>#Header {background: url(\''+percorso+'buco_titolo_opaco.png\') left top no-repeat}')
    document.write('#Panel ul {background: #3E639A url(\''+percorso+'bg_ultimecazzate_opaco.png\') left top no-repeat}');
    document.write('#Panel ul.statistike {background: #3E639A url(\''+percorso+'bg_statistike_opaco.png\') left top no-repeat; border-top:none; padding-top:1px}');
    document.write('#Panel ul.inut {background: #3E639A url(\''+percorso+'bg_inutility_opaco.png\') left top no-repeat; border-top:none; padding-top:1px}'); 
    document.write('#Panel h1 a {background: url(\''+percorso+'bg_panel_h1_opaco.png\') center center no-repeat}'); 
    document.write('#Panel h1 a:hover {background: url(\''+percorso+'bg_panel_h1_hover.png\') center center no-repeat}');
    document.write('#Content {background: #c8d6ea url(\''+percorso+'bg_content_opaco.png\') right top no-repeat}'); 
    document.write('#Discussions li ul {background:#fff url(\''+percorso+'bg_discussions_li_ul_opaco.png\') right top no-repeat}'); 
    document.write('.PageInfo {background:url(\''+percorso+'bg_pageinfo_opaco.png\') right top no-repeat}'); 
    document.write('#RicercaVeloce {background: #39639C url(\'http://www.marok.org/Buco/extensions/LiveSearch/bg_ricerca_opaco.png\') right top no-repeat}'); 
    document.write('</style>');
    }
}

// Netscape 4

if (document.layers) {
	document.write('<font face=Verdana size=4 color="#ffff00"><blink>Netscape4? MA KAAAAAAAAASTROX!!!</blink></font><br><center><a href="#" onclick="alert(\'Nessuna opzione che abbia un senso &egrave; disponibile su Netscape4\'); return false"><img src="http://www.marok.org/Buco/themes/vanilla/styles/marok/buco_titolo_netscape4.gif" width=452 height=115 border=0 alt="Soka"></a></center>');
	document.write('<style type="text/css">');
	document.write('#Panel, .ContentInfo, #Cal {display:none}');
	document.write('#Session {padding:0px}');
	document.write('#Header {display:none}');
	document.write('#Header h1 {color:white; background:#39639C; height:50px; border:1px solid white}');
	document.write('#Header ul {display:none}');
	document.write('#ContentBody {position:absolute; left:0px; top:200px; width:600px}');
	document.write('#Content {background:white}');
	document.write('.DiscussionType, .DiscussionCategory, .DiscussionStarted, .DiscussionComments, .DiscussionLastComment, .DiscussionActive {display:none; visibility:hidden; visibility:hide; display:hide}');
	document.write('</style>');
}


// Vecchi browser

if (!document.getElementById && !document.all && !document.layers) {
	document.write('<font face=Verdana size=2>Sullo skifo di browser che stai usando, sei abilitato in sola lettura... in altre parole, non puoi scrivere un cazzo. Per fortuna.');
}

if (document.getElementById||document.all) {
function pulsanti(aperto,chiuso,contenuto) {document.write("<a href=\"boh1.htm\" id=\""+aperto+"\" onclick=\"document.getElementById('"+aperto+"').style.display = 'none'; document.getElementById('"+chiuso+"').style.display = ''; document.getElementById('"+contenuto+"').style.display = 'none'; return false\"><img src=\"http://www.marok.org/Kroste/Images/riduci.png\" border=0 class=\"accendispegni\" style=\"float:right; margin-right:3px; margin-top:"+pospuls+"px\" alt=\"Spegni\" title=\"sdsd\"></a><a href=\"boh2.htm\" id=\""+chiuso+"\" onclick=\"document.getElementById('"+aperto+"').style.display = ''; document.getElementById('"+chiuso+"').style.display = 'none'; document.getElementById('"+contenuto+"').style.display = '';  return false\"><img src=\"http://www.marok.org/Kroste/Images/espandi.png\" border=0 class=\"accendispegni\" style=\"float:right; margin-right:3px; margin-top:"+pospuls+"px\" alt=\"Accendi\"></a>")};
function pulsanti2(aperto, chiuso, contenuto) {document.getElementById(aperto).style.display = 'none'; document.getElementById(chiuso).style.display = ''; document.getElementById(contenuto).style.display = 'none';};
}

if (document.getElementById||document.all) {
if(document.all&&!document.getElementById){document.getElementById=function(A){return document.all[A]}}function BlockSubmit(B,C){var A=B.keyCode||B.which;if(A==13){C();return false}else{return true}}function CheckAll(B){var A=Explode(B,",");for(j=0;j<A.length;j++){CheckSwitch(A[j],true)}}function CheckNone(B){var A=Explode(B,",");for(j=0;j<A.length;j++){CheckSwitch(A[j],false)}}function CheckSwitch(C,A){var B=document.getElementsByTagName("input");for(i=0;i<B.length;i++){if(B[i].type=="checkbox"&&B[i].id.indexOf(C)==0){B[i].checked=A}}}function ClearContents(A){if(A){A.innerHTML=""}}function CompletePreferenceSet(B){var A=document.getElementById(B);if(A){A.className="PreferenceComplete"}}function Explode(B,A){return B.split(A)}function Focus(A){var B=document.getElementById(A);if(B){B.focus()}}function GetElements(A,B){var D=document.getElementsByTagName(A);var C=new Array();for(i=0;i<D.length;i++){if(D[i].id.indexOf(B)==0){C[C.length]=D[i]}}return C}function HideElement(A,C){var B=document.getElementById(A);if(B){B.style.display="none";if(C==1){ClearContents(B)}}}function PathFinder(){this.params=new function(){this.url=document.URL;this.domain=document.domain;this.httpMethod=this.url.replace(/^(http|https)(:\/\/).*$/,"$1$2");return this};this.getRootPath=function(C,B,F){var A=document.getElementsByTagName(C);var G="";var D="";for(var E=0;E<A.length;E++){G="";if(A[E].getAttribute&&A[E].getAttribute(B)){G=A[E].getAttribute(B)}else{if(A[E][B]){G=A[E][B]}}if(G.match(F)){D=G.replace(F,"");D=D.replace(/^http(s)?:\/\/[^\/]+/,"");break}}return D||false};return this}function PopTermsOfService(A){window.open(A,"TermsOfService","toolbar=no,status=yes,location=no,menubar=no,resizable=yes,height=600,width=400,scrollbars=yes")}function PreferenceSet(A){setTimeout("CompletePreferenceSet('"+this.Param+"');",400)}function RefreshPage(A){if(!A){A=400}setTimeout("document.location.reload();",A)}function RefreshPageWhenAjaxComplete(A){RefreshPage()}function SubmitForm(C,A,B){Wait(A,B);document[C].submit()}function SwitchElementClass(C,F,A,G,E,D){var B=document.getElementById(C);Sender=document.getElementById(F);if(B&&Sender){if(B.className==G){B.className=A;Sender.innerHTML=E}else{B.className=G;Sender.innerHTML=D}}}function SwitchExtension(E,F,D){var C=document.getElementById(F);if(C){C.className="Processing"}var B="ExtensionKey="+F+"&PostBackKey="+D;var A=new DataManager();A.Param=F;A.RequestFailedEvent=SwitchExtensionResult;A.RequestCompleteEvent=SwitchExtensionResult;A.LoadData(E+"?"+B)}function SwitchExtensionResult(B){var A=document.getElementById(Trim(B.responseText));if(A){setTimeout("SwitchExtensionItemClass('"+Trim(B.responseText)+"')",400)}else{alert(Trim(B.responseText))}}function SwitchExtensionItemClass(C){var B=document.getElementById(C);var A=document.getElementById("chk"+C+"ID");if(B&&A){B.className=A.checked?"Enabled":"Disabled"}}function SwitchPreference(G,F,C,E){var A=document.getElementById(F);var D=document.getElementById(F+"ID");if(D&&A){A.className="PreferenceProgress";var B=new DataManager();B.Param=F;B.RequestFailedEvent=HandleFailure;if(C==1){B.RequestCompleteEvent=RefreshPageWhenAjaxComplete}else{B.RequestCompleteEvent=PreferenceSet}B.LoadData(G+"?Type="+F+"&PostBackKey="+E+"&Switch="+D.checked)}}function Trim(A){return A.replace(/^\s*|\s*$/g,"")}function UpdateCheck(D,B,C){var A=new DataManager();A.RequestCompleteEvent=UpdateCheckStatus;A.RequestFailedEvent=UpdateCheckStatus;A.Param=D;A.LoadData(D+"?RequestName="+B+"&PostBackKey="+C)}function UpdateCheckStatus(E){if(E.responseText=="COMPLETE"){return }var F=E.responseText.substring(0,E.responseText.indexOf("|"));if(F=="First"){var B=document.getElementById("Core");var G=document.getElementById("CoreDetails")}else{var B=document.getElementById(F);var G=document.getElementById(F+"Details")}var D=E.responseText.slice(E.responseText.indexOf("|")+1);var A=document.getElementById("FormPostBackKey");var C=(A)?A.value:"";if(B&&G){if(D.indexOf("ERROR]")==1){B.className="UpdateError";G.innerHTML=D.replace(/\[ERROR\]/g,"")}else{if(D.indexOf("OLD]")==1){B.className="UpdateOld"}else{if(D.indexOf("UNKNOWN]")==1){B.className="UpdateUnknown"}else{B.className="UpdateGood"}}G.innerHTML=D.replace(/\[OLD\]/g,"").replace(/\[UNKNOWN\]/g,"").replace(/\[GOOD\]/g,"");setTimeout("UpdateCheck('"+this.Param+"', '"+F+"', '"+C+"');",300)}}else{alert("Error: "+E.responseText)}}function Wait(A,C){A.disabled=true;A.value=C;var B=A.parentNode;while(B!=null){if(B.tagName=="FORM"){B.submit();break}B=B.parentNode}}function WriteEmail(D,B,G,A){if(document.createElement&&document.getElementById){var E,C,F;E=document.createElement("a");E.href="mailto:"+B+"@"+D;G=G||B+"@"+D;F=document.createTextNode(G);E.appendChild(F);C=document.getElementById(A);if(C){C.parentNode.appendChild(E)}}};
}