| Current Path : /home/sunflowe/www2/vacancesfloride/templates/ariolite/js/ |
| Current File : /home/sunflowe/www2/vacancesfloride/templates/ariolite/js/ariolite.js |
navHover = function() {
var lis = document.getElementById("user3").getElementsByTagName("LI");
for (var i=0; i<lis.length; i++) {
lis[i].onmouseover=function() {
this.className+=" iehover";
}
lis[i].onmouseout=function() {
this.className=this.className.replace(new RegExp(" iehover\\b"), "");
}
}
}
function modCount (areaId, classId, moduleClass, setModsHeight) {
var modsCount = 0;
modsToAssign = new Array();
maxHeight = new Array(0,0,0);
var mods = document.getElementById(areaId).getElementsByTagName('DIV');
for (var m=0; m<mods.length; m++) {
if (mods[m].className.indexOf(moduleClass) != -1) {
modsToAssign[modsCount] = mods[m];
modsCount += 1;
}
}
if (modsCount > 0) {
var modsCountNew = modsCount;
var fl = '';
for (var s=0; s<modsToAssign.length; s++) {
if (modsCountNew>3) {
if (s<=2) modsCount = 3;
if (s>2) modsCount = Math.min((modsCountNew-3),3);
if (s>5) modsCount = Math.min((modsCountNew-6),3);
}
newClassName = ' ' + classId + modsCount;
if (s==0 || s==3 || s==6) fl = ' first';
if (s==1 || s==4 || s==7) {
fl = ' middle';
if (modsToAssign.length ==2 || (modsToAssign.length ==5 && s==4) || (modsToAssign.length == 8 && s==7)) fl = ' last';
}
if (s==2 || s==5 || s==8) fl = ' last';
newClassName += fl;
if (areaId == 'btm-mods' && modsCount > 1) {
if ((s == 0 && modsCount == 2) || ((s == 0 || s == 1) && modsCount == 3)) newClassName += ' countin-border';
}
modsToAssign[s].className += newClassName;
if (setModsHeight) {
if (s<=2) { row = 0; } else if (s<=5) { row = 1; } else { row = 2; }
maxHeight[row] = Math.max(maxHeight[row], modsToAssign[s].offsetHeight);
}
}
if (setModsHeight) {
for (var s=0; s<modsToAssign.length; s++) {
if (s<=2) { row = 0; } else if (s<=5) { row = 1; } else { row = 2; }
if (modsToAssign[s].className.indexOf("moduletable") != -1) {
myEl = modsToAssign[s];
} else {
myEl = modsToAssign[s].getElementsByTagName("DIV")[2];
}
h3stripedFix = (myEl.className.indexOf("h3striped")!=-1)?10:0;
horzlinesFix = (myEl.className.indexOf("horzlines")!=-1)?8:0;
myEl.style.height = (maxHeight[row]-setModsHeight+h3stripedFix-horzlinesFix) + 'px';
}
}
}
}
function getBrowserHeight(){
if (window.innerHeight){return window.innerHeight;}
else if (document.documentElement && document.documentElement.clientHeight != 0){return document.documentElement.clientHeight;}
else if (document.body){return document.body.clientHeight;}
return 0;
}
function changeHght() {
h100 = document.getElementById('height100').offsetHeight;
hb = getBrowserHeight();
btmmods = (document.getElementById('btm-mods'))?document.getElementById('btm-mods').offsetHeight:0;
if (h100<=hb) {
document.getElementById('outer_inner').style.height = (hb-139-btmmods) + 'px';
}
hoi = document.getElementById('outer_inner').offsetHeight-34;
if (document.getElementById('sidebar_inner')) document.getElementById('sidebar_inner').style.height = hoi + 'px';
}
//jQuery.event.add (window,"load",changeHght);
//jQuery.event.add (window,"resize",changeHght);