shean71
06-14-2006, 03:23 AM
function BrowserIsNS() {
// var MS = navigator.appVersion.indexOf("MSIE");
// var isIE4 = ((parseInt(navigator.appVersion.substring(MS+5,MS+6)) >= 4) &&
// (navigator.appVersion.indexOf("MSIE"))>0);
var NSVER = parseInt(navigator.appVersion.substring(0,1));
if ((navigator.appName == "Netscape") && (NSVER == 4)) {
ISNS4 = true;
} else {
ISNS4 = false;
}
// alert(window.ISNS4);
return window.ISNS4;
}
// if (window.isNS4) {
// genMenuNS(title,image);
// } else {
// genMenuIE(title,image);
// }
//}
function genMenuIE(title,image) {
var htmlStr = new String;
htmlStr = "";
var aWidth = screen.availWidth;
if (aWidth >= 640) { col = 3;} else { col = 2;}
itemHeight = 150;
itemWidth = 200;
menuBorder= 10;
topOffset = 50;
leftOffset = (aWidth - ((itemWidth + menuBorder) * col - menuBorder))/2;
// menuLength = menu.length;
maxRow = menuLength / col ;
// document.open();
// var htmlStr = "<HTML><HEAD>" +
// "<link rel='stylesheet' HREF=/styles/general.css>" +
// "</HEAD><BODY>\n";
for (var i=0;i<maxRow;i++) {
for (var j=0;j<col;j++) {
itemTop = i * ( itemHeight + menuBorder ) + topOffset;
itemLeft = j * ( itemWidth + menuBorder ) + leftOffset;
document.write("<div id='itemcnt' style='position:absolute;top:" +
itemTop + ";left:" + itemLeft + ";height:" +
itemHeight + ";width:" + itemWidth + "'>\n" +
"<img src='" + image + "'>\n" +
"</div>\n");
}
}
// htmlStr += "</BODY></HEAD></HTML>\n";
// alert(htmlStr);
// document.write(htmlStr);
// document.close();
}
function genMenuNS(title,image) {
var htmlStr = new String;
htmlStr = "";
var aWidth = screen.availWidth;
if (aWidth >= 640) { col = 3;} else { col = 2;}
itemHeight = 150;
itemWidth = 200;
menuBorder= 10;
topOffset = 50;
leftOffset = (aWidth - ((itemWidth + menuBorder) * col - menuBorder))/2;
// menuLength = menu.length;
maxRow = menuLength / col ;
// document.open();
// var htmlStr = "<HTML><HEAD>" +
// "<link rel='stylesheet' HREF=/styles/general.css>" +
// "</HEAD><BODY>\n";
for (var i=0;i<maxRow;i++) {
for (var j=0;j<col;j++) {
itemTop = i * ( itemHeight + menuBorder ) + topOffset;
itemLeft = j * ( itemWidth + menuBorder ) + leftOffset;
document.write("<div style='position:absolute;top:" +
itemTop + ";left:" + itemLeft + ";height:" +
itemHeight + ";width:" + itemWidth + "'>\n" +
"<img src='" + image + "'>\n" +
"</div>\n");
}
}
// htmlStr += "</BODY></HEAD></HTML>\n";
// alert(htmlStr);
// document.write(htmlStr);
// document.close();
}
function arrangeNS(menuLength) {
var itemOffset;
var myLayer;
var aWidth = screen.availWidth;
if (aWidth >= 640) { col = 3;} else { col = 2;}
itemHeight = 150;
itemWidth = 200;
menuBorder= 10;
topOffset = 50;
leftOffset = (aWidth - ((itemWidth + menuBorder) * col - menuBorder))/2;
maxRow = menuLength / col ;
for (var i=0;i<maxRow;i++) {
for (var j=0;j<col;j++) {
// eval("myLayer=document.layers[\"img_" + (i * col + j) + "\"]");
// myLayer.moveTo( j * ( itemWidth + menuBorder ) + leftOffset,i * ( itemHeight + menuBorder ) + topOffset);
eval("myLayer=document.layers[\"item_" + (i * col + j) + "\"]");
myLayer.moveTo(j * ( itemWidth + menuBorder ) + leftOffset,i * ( itemHeight + menuBorder ) + topOffset);
}
}
//document.layers["img_4"].top = 1 * (itemHeight + menuBorder ) + topOffset;
//document.layers["img_4"].left = 1 * (itemHeight + menuBorder ) + topOffset;
}
function arrangeIE() {
}
// var MS = navigator.appVersion.indexOf("MSIE");
// var isIE4 = ((parseInt(navigator.appVersion.substring(MS+5,MS+6)) >= 4) &&
// (navigator.appVersion.indexOf("MSIE"))>0);
var NSVER = parseInt(navigator.appVersion.substring(0,1));
if ((navigator.appName == "Netscape") && (NSVER == 4)) {
ISNS4 = true;
} else {
ISNS4 = false;
}
// alert(window.ISNS4);
return window.ISNS4;
}
// if (window.isNS4) {
// genMenuNS(title,image);
// } else {
// genMenuIE(title,image);
// }
//}
function genMenuIE(title,image) {
var htmlStr = new String;
htmlStr = "";
var aWidth = screen.availWidth;
if (aWidth >= 640) { col = 3;} else { col = 2;}
itemHeight = 150;
itemWidth = 200;
menuBorder= 10;
topOffset = 50;
leftOffset = (aWidth - ((itemWidth + menuBorder) * col - menuBorder))/2;
// menuLength = menu.length;
maxRow = menuLength / col ;
// document.open();
// var htmlStr = "<HTML><HEAD>" +
// "<link rel='stylesheet' HREF=/styles/general.css>" +
// "</HEAD><BODY>\n";
for (var i=0;i<maxRow;i++) {
for (var j=0;j<col;j++) {
itemTop = i * ( itemHeight + menuBorder ) + topOffset;
itemLeft = j * ( itemWidth + menuBorder ) + leftOffset;
document.write("<div id='itemcnt' style='position:absolute;top:" +
itemTop + ";left:" + itemLeft + ";height:" +
itemHeight + ";width:" + itemWidth + "'>\n" +
"<img src='" + image + "'>\n" +
"</div>\n");
}
}
// htmlStr += "</BODY></HEAD></HTML>\n";
// alert(htmlStr);
// document.write(htmlStr);
// document.close();
}
function genMenuNS(title,image) {
var htmlStr = new String;
htmlStr = "";
var aWidth = screen.availWidth;
if (aWidth >= 640) { col = 3;} else { col = 2;}
itemHeight = 150;
itemWidth = 200;
menuBorder= 10;
topOffset = 50;
leftOffset = (aWidth - ((itemWidth + menuBorder) * col - menuBorder))/2;
// menuLength = menu.length;
maxRow = menuLength / col ;
// document.open();
// var htmlStr = "<HTML><HEAD>" +
// "<link rel='stylesheet' HREF=/styles/general.css>" +
// "</HEAD><BODY>\n";
for (var i=0;i<maxRow;i++) {
for (var j=0;j<col;j++) {
itemTop = i * ( itemHeight + menuBorder ) + topOffset;
itemLeft = j * ( itemWidth + menuBorder ) + leftOffset;
document.write("<div style='position:absolute;top:" +
itemTop + ";left:" + itemLeft + ";height:" +
itemHeight + ";width:" + itemWidth + "'>\n" +
"<img src='" + image + "'>\n" +
"</div>\n");
}
}
// htmlStr += "</BODY></HEAD></HTML>\n";
// alert(htmlStr);
// document.write(htmlStr);
// document.close();
}
function arrangeNS(menuLength) {
var itemOffset;
var myLayer;
var aWidth = screen.availWidth;
if (aWidth >= 640) { col = 3;} else { col = 2;}
itemHeight = 150;
itemWidth = 200;
menuBorder= 10;
topOffset = 50;
leftOffset = (aWidth - ((itemWidth + menuBorder) * col - menuBorder))/2;
maxRow = menuLength / col ;
for (var i=0;i<maxRow;i++) {
for (var j=0;j<col;j++) {
// eval("myLayer=document.layers[\"img_" + (i * col + j) + "\"]");
// myLayer.moveTo( j * ( itemWidth + menuBorder ) + leftOffset,i * ( itemHeight + menuBorder ) + topOffset);
eval("myLayer=document.layers[\"item_" + (i * col + j) + "\"]");
myLayer.moveTo(j * ( itemWidth + menuBorder ) + leftOffset,i * ( itemHeight + menuBorder ) + topOffset);
}
}
//document.layers["img_4"].top = 1 * (itemHeight + menuBorder ) + topOffset;
//document.layers["img_4"].left = 1 * (itemHeight + menuBorder ) + topOffset;
}
function arrangeIE() {
}