Cybertooth Tiger
02-05-2003, 12:05 AM
I remmember seeing here somewhere a script that allowed a single bg image to be streached depending on the resolution of the screen being used.
It was an excelent script. Can any one please point me to its location.
Thanx in advance
Tonz
Quiet Storm
02-05-2003, 12:58 AM
http://www.angelfire.com/mo2/cbch21/TEST/BGstrech.html
:D
Cybertooth Tiger
02-06-2003, 07:27 PM
Originally posted by Quiet Storm
http://www.angelfire.com/mo2/cbch21/TEST/BGstrech.html
:D
Awesome.... many thanks.
How do i get it without the pop up please.
Tonz
IE:....
<script language="JavaScript">
<!--
var CategoryString = "(none)";
var searchStringLong = "sdx-v6";
var popupURL = "/sys/popup_source.shtml";
if( CategoryString != "(none)" && searchStringLong != "(none)")
{
popupURL = popupURL + "?Category=" + CategoryString + "&search_string=" + searchStringLong;
}
else if( CategoryString != "(none)" )
{
popupURL = popupURL + "?Category=" + CategoryString;
}
else if( searchStringLong != "(none)" )
{
popupURL = popupURL + "?search_string=" + searchStringLong;
}
var adname = "Ad";
var cookie_name = "Popup";
var expire = 5;
var factor = 1;
var popup = null;
var view_count = 0;
var expdate = new Date();
ShowPopup();
function ShowPopup() {
openWin();
}
function openWin () {
// browser detect loads differently sized window for netscape 3.x
if (navigator.appName=="Netscape" && parseInt(navigator.appVersion)<=3) {
popup = window.open(popupURL,adname,'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resi zable=0,width=619,height=125');
} else {
popup = window.open(popupURL,adname,'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resi zable=0,width=602,height=105');
}
if(popup != null) {
popup.location = popupURL;
if( navigator.appName.substring(0,8) == "Netscape" ) {
popup.location = popupURL;
popup.opener = self;
}
}
popup.close = function new_close_function() {};
}
function getCookieVal (offset) {
var endstr = document.cookie.indexOf (";", offset);
if (endstr == -1) {
endstr = document.cookie.length;
}
return unescape(document.cookie.substring(offset, endstr));
}
function GetCookie (name) {
var arg = name + "=";
var alen = arg.length;
var clen = document.cookie.length;
var i = 0;
while (i < clen) {
var j = i + alen;
if (document.cookie.substring(i, j) == arg) {
return getCookieVal (j);
}
i = document.cookie.indexOf(" ", i) + 1;
if (i == 0) {
break;
}
}
return null;
}
function SetCookie (name, value) {
var argv = SetCookie.arguments;
var argc = SetCookie.arguments.length;
var expires = (argc > 2) ? argv[2] : null;
var path = (argc > 3) ? argv[3] : null;
var domain = (argc > 4) ? argv[4] : null;
var secure = (argc > 5) ? argv[5] : false;
document.cookie = name + "=" + escape (value) +
((expires == null) ? "" : ("; expires=" + expires.toGMTString())) +
((path == null) ? "" : ("; path=" + path)) +
((domain == null) ? "" : ("; domain=" + domain)) +
((secure == true) ? "; secure" : "");
}
function changeOpenFunction() {
var original_window_open = window.open;
function new_open_function(url,name,features,replace) {
if (name != "TripodPopup")
return original_window_open(url,name,features,replace);
}
window.open = new_open_function;
}
var bName=navigator.appName;
if (bName!="Netscape")
changeOpenFunction();
//-->
</script>
<script language="JavaScript">
<!--
// Cache-busting LUBID bug.
var ran = Math.round(Math.random() * 899999) + 100000;
var lubid_string = "<img src=\"http://hb.lycos.com/header?VID=6105&LHIG=1&ord=" + ran + "\" height=\"1\" width=\"1\">";
document.write(lubid_string);
//-->
</script>
Quiet Storm
02-06-2003, 09:18 PM
Sorry... stupid Angelfire.
<HEAD>
<SCRIPT LANGUAGE="JavaScript1.2">
<!--
NS4=(document.layers);
IE4=(document.all);
ver4=(NS4 || IE4);
scaleWidth = true;
scaleHeight = true;
imSRC = "YourImage.jpg";
if (NS4) onload = setResize;
function setResize(){
setTimeout('window.onresize=reDo;',500);
}
function reDo(){
window.location.reload()
}
if (IE4) onresize = reDoIE;
function reDoIE(){
imBG.width = document.body.clientWidth;
imBG.height = document.body.clientHeight;
}
function makeIm() {
winWid = (NS4) ? innerWidth : document.body.clientWidth;
winHgt = (NS4) ? innerHeight : document.body.clientHeight;
imStr = "<DIV ID=elBGim"
+ " STYLE='position:absolute;left:0;top:0;z-index:-1'>"
+ "<IMG NAME='imBG' BORDER=0 SRC="+imSRC;
if (scaleWidth) imStr += " WIDTH="+winWid;
if (scaleHeight) imStr += " HEIGHT="+winHgt;
imStr += "></DIV>";
document.write(imStr);
}
//-->
</SCRIPT>
</HEAD>
<BODY>
<SCRIPT LANGUAGE="JavaScript1.2">
makeIm();
</SCRIPT>
... rest of your content...
</BODY>
Cybertooth Tiger
02-06-2003, 11:51 PM
Many thanx Quiet Strorm.
Owe 'Ya one.
Tonz
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.