PDA

View Full Version : Dhtml ad box problem - does not work



j7hnw
05-22-2009, 04:03 PM
Please can you help - I am trying to use the DHTML Ad Box script and have inserted as instructed in this page - but it doesnt work. Please can somebody help ?

www.interpak.ltd.uk/index.asp

Code is as follows ( i HAVE STRIPPED OUT SOME META TAGS )


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="title" content="Interpak - Foam Pack Manufacturers ,
<link rel="stylesheet" type="text/css" href="siteassist_css/style.css" />
<link rel="stylesheet" type="text/css" href="siteassist_css/color.css" />
<link rel="stylesheet" type="text/css" href="siteassist_css/template.css" />
<link rel="stylesheet" type="text/css" href="siteassist_css/navigation.css" />
<link rel="stylesheet" type="text/css" href="siteassist_css/navigation_color.css" />
<link rel="stylesheet" type="text/css" href="siteassist_css/my_styles.css" />
<style type="text/css">
<!--
body {
background-color: #C0C0C0;
background-image: url(Graphics/content2_bg.png);
background-repeat: repeat;
background-position: center 50%;
}

-->
</style>

<style type="text/css">
<!--
#sponsorAdDiv {position:absolute; height:1; width:1px; top:0; left:0;}
-->
</style>

<script type="text/javascript">

/******************************************
* DHTML Ad Box (By Matt Gabbert at http://www.nolag.com)
* Visit http://www.dynamicdrive.com/ for full script
* This notice must stay intact for use
******************************************/

adTime=10; // seconds ad reminder is shown
chanceAd=1; // ad will be shown 1 in X times (put 1 for everytime)

var ns=(document.layers);
var ie=(document.all);
var w3=(document.getElementById && !ie);
var calunit=ns? "" : "px"
adCount=0;
function initAd(){
if(!ns && !ie && !w3) return;
if(ie) adDiv=eval('document.all.sponsorAdDiv.style');
else if(ns) adDiv=eval('document.layers["sponsorAdDiv"]');
else if(w3) adDiv=eval('document.getElementById("sponsorAdDiv").style');
randAd=Math.ceil(Math.random()*chanceAd);
if (ie||w3)
adDiv.visibility="visible";
else
adDiv.visibility ="show";
if(randAd==1) showAd();
}
function showAd(){
if(adCount<adTime*10){adCount+=1;
if (ie){documentWidth =truebody().offsetWidth/2+truebody().scrollLeft-20;
documentHeight =truebody().offsetHeight/2+truebody().scrollTop-20;}
else if (ns){documentWidth=window.innerWidth/2+window.pageXOffset-20;
documentHeight=window.innerHeight/2+window.pageYOffset-20;}
else if (w3){documentWidth=self.innerWidth/2+window.pageXOffset-20;
documentHeight=self.innerHeight/2+window.pageYOffset-20;}
adDiv.left=documentWidth-200+calunit;adDiv.top =documentHeight-200+calunit;
setTimeout("showAd()",100);}else closeAd();
}
function closeAd(){
if (ie||w3)
adDiv.display="none";
else
adDiv.visibility ="hide";
}

function truebody(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

onload=initAd;
//End-->
</script>

</head>

<body id="homePage" onload="">
<div id="globalContainer">
<div id="topArea"><span style="clear: both;"><img src="Graphics/Webheader.jpg" alt="Interpak - Foam Pack Manufacturers" width="760" height="207" border="0" usemap="#Map" /></span>
<map name="Map" id="Map">
<area shape="rect" coords="13,174,47,184" href="../index.asp" />
<area shape="rect" coords="88,174,142,185" href="../about.asp" />
<area shape="rect" coords="185,172,232,188" href="../products.asp" />
<area shape="rect" coords="281,173,365,186" href="../onlinepayments.asp" />
<area shape="rect" coords="411,174,460,186" href="../contact.asp" />
<area shape="rect" coords="526,174,607,186" href="../priceincreases.asp" />
<area shape="rect" coords="641,173,742,185" href="../conditionsofsale.asp" />
</map>
<br />
<div style="clear: both;"></div>
</div>
<div id="innerContainer">
<div id="innerLeft">
<div id="resources">
<div class="featuredRight"> <span class="style23"><br />
Interpak are designers and manufacturers of High Performance foam packs and also composite packs.
We design packs to ensure your products can be shipped safely around the globe - no matter how sensitive they may be. We offer a complete package from the initial concept and design - through our In House production facilities. <br />
<br />
With Interpak - your products will be in safe hands.We can work from sketches , samples or any electronic form of drawings to
design your packs. Our experienced design team will work around the criteria
given to them
to achieve a product which will protect
your item in transit .
We
offer in house Pressing, Fabricating, Lamination of composites and assembly
where required. We also stock all standard items such as Bubblewrap, cartons,
tapes etc.Coupled with over 30 years experience in our field - we are also accredited to the <strong> IS0 9001</strong> Design And Manufacture standard so you can rest assured our systems are in place to achieve total customer satisfaction.</span><br />
<span class="style23"><span class="SiteDescription SiteDescription"><br />
Our sales team are waiting to take your call<br />
FREE OF CHARGE on <span class="style19">0800 881 8776</span></span></span><br />
<br />
<br />
<br />
<div id="lh5"><span class="style5">Download our Brochure in PDF format</span><br />
<br />
<a href="Interpak_Leaflet.pdf" target="_blank">Click here to download our PDF </a></div>
<p>&nbsp;</p>
<p><br />
<br />
</p>
</div>
<p>&nbsp;</p>
</div>
</div>
<div id="innerRight">
<div id="featured">
<h1 align="center" class="style3">
<br />
<br />
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="475" height="60">
<param name="movie" value="Graphics/interpaknew.swf" />
<param name="quality" value="high" />
<param name="BGCOLOR" value="#6D6DE5" />
<param name="LOOP" value="false" />
<embed src="Graphics/interpaknew.swf" width="475" height="60" loop="False" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" bgcolor="#6D6DE5"></embed>
</object>
<br />
<br />
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="480" height="400">
<param name="movie" value="images.swf" />
<param name="quality" value="high" />
<param name="wmode" value="opaque" />
<param name="BGCOLOR" value="#6D6DE5" />
<embed src="images.swf" width="480" height="400" quality="high" wmode="opaque" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" bgcolor="#6D6DE5"></embed>
</object>
</h1>
<blockquote>
<blockquote>
<blockquote>
<table width="363" border="1">
<tr>
<td><br /> <span class="whitedot">.............................................................</span><span class="style23">Website design by : <a href="http://www.webjectives.co.uk" target="_blank">Webjectives</a></span></td>
</tr>
</table>
<p class="style23"><br />
</p>
</blockquote>
</blockquote>
</blockquote>
</div>
</div>
</div>
</div>

</td></tr></table></td></tr></table>
</div>

<div id="sponsorAdDiv" style="visibility:hidden">
<table width="450px" height="350px" bgcolor="#008000"><tr><td>
<table width="445px" height="345px" bgcolor="#F0FFF0"><tr><td align="center" valign="middle">

<!--*****EDIT THIS MESSAGE*****-->
<A HREF="http://www.amazon.com/exec/obidos/redirect-home/wa0c?tag-id=wa0c&placement=home-btn-100x70.gif&site=amazon">
<IMG SRC="http://www.associmg.com/assoc/us/home-btn-100x70.gif?tag-id=wa0c"></A><p><b>Please take time to show your support<br>
for this site by visiting one<br>
of our sponsors during this<br> brief intermission.</b>
</p>
<p><A HREF="http://www.amazon.com/exec/obidos/redirect-home/wa0c?tag-id=wa0c&placement=home-logo-130x60b.gif&site=amazon">
<IMG SRC="http://www.associmg.com/assoc/us/home-logo-130x60b.gif?tag-id=wa0c"></A></p>
<p>(This announcement will close shortly)
<br>

<!--*****EDIT THE ABOVE MESSAGE*****-->
</td></tr></table></td></tr></table>
</div>

</body>
</html>