This code is from Dynamic Web Coding
at http://www.dyn-web.com/
Copyright 2002 by Sharon Paine
See Terms of Use at http://www.dyn-web.com/bus/terms.html
Permission granted to use this code
as long as this entire notice is included.
*/
var origWidth, origHeight;
if (document.layers) {
origWidth = window.innerWidth;
origHeight = window.innerHeight;
}
//////////////////////////////////////////////////////////////////////////
// Customization Area
//
// If your wipe series includes images, put them in this array for preload.
// Like below, commented out here because no images used in this example.
//var wipe_imgs=new Array('images/dwc_btn.gif','images/logo.gif');
var wipe_imgs=new Array(); // empty because no images used here
if (document.images) {
var theImgs=new Array();
for (var i=0;icris.r WebDesign',1000,
'Prague / Czech Rep.',1000,
'enjoy some cool stuff',1000
);
var wipe_in_delay=500; // delay before each wipe in
var wipe_out_delay=500; // delay before each wipe out
// wipe out speed (wipe-in time is divided by this number)
var wipe_out_dv=4; // 2 to 4 recommended
var wipe_in_logo_delay=1; // delay before wiping in big logo
var wipe_in_logo=1; // time allotted for wipe in of big logo
var dest_delay=1; // delay before going to destination url
// destination url, where to go at end of wipes
function setDest() {
window.location = "index_JS.html";
}
// end customization area
/////////////////////////////////////////////////////////////////////
function to_do_onresize() {
if (document.layers) {
if (window.innerWidth != origWidth || window.innerHeight != origHeight)
window.location.reload();
} else setTimeout("rePosition()",200);
}
window.onresize = to_do_onresize;
function rePosition() {
if (wipeLyr1) wipeLyr1.centerIn(window);
if (wipeLyr2) wipeLyr2.centerIn(window);
}
var wipeLyr1, wipeLyr2;
function initDynLyrs() {
wipeLyr1 = new dynObj('wipeDiv1');
wipeLyr2 = new dynObj('wipeDiv2');
// send non-capable browsers to destination url now
if (!wipeLyr1 || !document.layers && typeof wipeLyr1.doc.innerHTML == "undefined"){
setDest();
return;
}
wipeLyr2.centerIn(window);
doWipes();
}
window.onload=initDynLyrs;
var wipe_count=0; // to keep track
function doWipes() {
if (wipe_count';
wipePrep(wipeLyr1,cntnt,'w1');
wipeLyr1.centerIn(window);
/////////////////////////////////////////////////////////////////////////
// You could choose other wipe effects and place them in the 3 calls
// to wipe below. For the complete list of wipe effects,
// see http://www.dyn-web.com/dhtml/examples/wipe_select.html
// or http://www.dyn-web.com/tutorials/about-wipes2.html
/////////////////////////////////////////////////////////////////////////
// args: which wipe, delay, wipeTime, what next
wipeLyr1.wipe("in right", wipe_in_delay,wipe_array[wipe_count+1],"wipeOuts()");
} else {
// What to do when all your array elements have been wiped.
// wipes in image, then sends to destination url
wipeLyr2.wipe("in center", wipe_in_logo_delay,wipe_in_logo,"setTimeout('setDest()',dest_delay)");
}
}
function wipeOuts() {
wipeLyr1.wipe("out middle", wipe_out_delay,wipe_array[wipe_count+1]/wipe_out_dv,"doWipes()");
wipe_count+=2;
}
// prepare for wipe in (called from doWipes fn)
function wipePrep(obj,cntnt,id) {
obj.hide();
// restore, for ns4, or new content is visible...
obj.clipTo(0,obj.width,obj.height,0);
obj.writeLyr(cntnt);
obj.width=getWidth(obj.el,id);
obj.height=getHeight(obj.el,id);
}
//-->