Created
November 20, 2011 19:47
-
-
Save catwell/1380775 to your computer and use it in GitHub Desktop.
CMSO script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function resize() { | |
try { | |
var hauteur=450; | |
var doc=""; | |
if(nav.indexOf('Opera')==-1) { | |
if(document.all) { | |
doc=document.all.mainframe; | |
if(nav.indexOf('Mac')!=-1) { | |
hauteur=document.frames['mainframe'].document.body.offsetHeight; | |
} | |
else { | |
hauteur=document.frames['mainframe'].document.body.scrollHeight+75; | |
} | |
} | |
else { | |
doc=document.getElementById('mainframe'); | |
hauteur = doc.contentDocument.body.offsetHeight+75; | |
} | |
} | |
else if(navigator.appName=='Opera'){ | |
doc=document.getElementById('mainframe'); | |
hauteur = doc.contentDocument.body.offsetHeight+75; | |
} | |
if((parseInt(doc.style.height) != hauteur) && (parseInt(doc.style.height) !=(hauteur-75))) { | |
if(hauteur>450) { | |
doc.style.height=hauteur; | |
} | |
else { | |
doc.style.height=450; | |
} | |
document.getElementById("page").scrollTop=-1; | |
} | |
if(navigateur()==2) { | |
setTimeout("resize()",5000); | |
} | |
} | |
catch(e){ | |
try { | |
if (document.getElementById("liste_conseiller").style.display == "block") { | |
doc.style.height = 1000; | |
document.getElementById("page").scrollTop = -1; | |
} else if (document.getElementById("epargne_salariale").style.display == "block") { | |
doc.style.height = 750; | |
document.getElementById("page").scrollTop = -1; | |
} | |
} catch (e) { | |
} | |
} | |
if (document.getElementById("liste_conseiller").style.display == "block") { | |
doc.style.height = 1000; | |
document.getElementById("page").scrollTop = -1; | |
}; | |
} | |
function setSize(taille) { | |
var hauteur=0; | |
if(document.all) { | |
if(document.all.mainframe.style.height != '') { | |
var hauteur=parseInt(document.all.mainframe.style.height)+taille; | |
} else { | |
var hauteur = 450+taille; | |
} | |
document.all.mainframe.style.height=hauteur; | |
} | |
else { | |
var hauteur=parseInt(document.getElementById('mainframe').style.height)+taille; | |
document.getElementById('mainframe').style.height=hauteur; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment