in IE it works perfectly how it is, i didnt show the rest of the code bc both IE and FF see what X_pos is, its just that IE sets the style.left to X_pos and FF does not ...heres the entire function
Code:
function P7_autoLayers() {
var g,b,k,f,args=P7_autoLayers.arguments;
if(!document.p7setc) {p7c=new Array();document.p7setc=true;}
for(k=0; k<p7c.length; k++) {
// w = MM_findObj(args[1]);
//alert(p7c[k]+','+args[1]);
//if(p7c[k] != args[1]){
for(HH=0;HH<=8;HH++){
if(p7c[k] == noHide[HH]){
//alert(noHide[HH]);
p7c[k] = 'bob';
}}
if((g=MM_findObj(p7c[k]))!=null) {
//alert(p7c[k]);
b=(document.layers)?g:g.style;b.visibility="hidden";}}
for(k=0; k<args.length; k++) {
if((g=MM_findObj(args[k])) != null) {
b=(document.layers)?g:g.style;b.visibility="visible";f=false;
//////////////////////////////////////////////
//////////////////////////////////////////////
/////////set position/////////////////////////
// marginLeft = document.body.style.margin-left;
//alert(marginLeft);
// docTop = document.body.style.marginTop = 12;
//docLeft = document.body.style.marginLeft = 12;
if(parseInt(document.body.style.marginLeft)) {
docLeft = parseInt(document.body.style.marginLeft);
}else{
docLeft = document.body.leftMargin;
}
if(parseInt(document.body.style.marginTop)) {
docTop = parseInt(document.body.style.marginTop);
}else{
docTop = document.body.topMargin;
}
//docTop = document.body.topMargin;
//alert('top='+docTop+' '+'left='+docLeft);
//alert(parseInt(document.body.style.marginLeft));
w = MM_findObj(args[1]);
//alert(w);
X_pos = findPosX(w);//+Number(docLeft);//+10;
//alert(w.offsetHeight);
Y_pos = findPosY(w)+Number(w.offsetHeight);//+Number(docTop);//+33;
//Y_pos += 200;
//X_pos = 400;
drop_width = b.width;
d_w = drop_width.split('p');
drop_width = d_w[0];
//alert(drop_width);
right_side = Number(X_pos)+Number(drop_width);
///////////get doc width and hieght////////////
//opera Netscape 6 Netscape 4x Mozilla
if (window.innerWidth || window.innerHeight){
docwidth = window.innerWidth;
docheight = window.innerHeight;
}
//IE Mozilla
if (document.body.clientWidth || document.body.clientHeight){
docwidth = document.body.clientWidth;
docheight = document.body.clientHeight;
}
//alert(docwidth);
//////////////////////////////////////////////
if(right_side>docwidth){
over = Number(drop_width) - Number(w.offsetWidth);
X_pos -= over;
}
// SET THE STYLES
//b=(document.layers)?g:g.style;b.left=X_pos;f=false;
//b=(document.layers)?g:g.style;b.top=Y_pos;f=false;
b.left=X_pos;
b.top=Y_pos;
//alert(b);
//alert('X_pos= '+X_pos+' left= '+b.left+' Y_pos= '+Y_pos+' top= '+b.top);
/*
b=(document.layers)?g:g.style;b.left=470;f=false;
b=(document.layers)?g:g.style;b.top=470;f=false;
*/
///////////////////////////////////////////
///////////////////////////////////////////
///////////////////////////////////////////
for(j=0;j<p7c.length;j++) {
if(args[k]==p7c[j]) {f=true;}}
if(!f) {p7c[p7c.length++]=args[k];}}}
}
Bookmarks