hi,

i have a small issue. i have games portal in that portal i am trying to add google flash ads before the game loads. everything is working fine but the problem is i have taken two divs with game content loading in one div and ad content loading in another div.

i am first loading the ad content before the game loads and after this i am loading the game content. both are working fine. but the ad content is flicking like its loading two times. its a big issue.

**Ad and game loading code**
<!-- ads div -->
<div id="ads" style="display:inline">

<object classid="clsid27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="618" height="500">
<param name="movie" value="http://www.startonlinegames.com/swf/google2-FullSlot_adsCs5.swf" />
<param name="quality" value="high" />
<param name="allowScriptAccess" value="always" />
<param name="wmode" value="opaque"/>
<embed src="http://www.startonlinegames.com/swf/google2-FullSlot_adsCs5.swf" allowScriptAccess="always" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="618" height="500" />

</object>
</div>

<!-- Game div -->

<div id='gamecontent' style='height:550px; visibility:hidden; display:none'>

<object classid="clsid27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="700" height="570">
<param name="movie" value="http://www.startonlinegames.com/swf/games/<?php echo $playGameRow['filename'];?>" />
<param name="quality" value="high" />
<param name="allownetworking" value="internal">
<embed src="http://www.startonlinegames.com/swf/games/<?php echo $playGameRow['filename'];?>" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" allownetworking="internal" width="700" height="<?php echo $playGameRow['height'];?>">
</embed>
</object>
</div>


**javascript code:**



<script type="text/javascript">
function turn_vis_on(id) {
if (document.getElementById) { // DOM3 = IE5, NS6
document.getElementById(id).style.display = 'inline';
obj = document.getElementById(id);
obj.style.visibility = "visible";
}
}
function turn_vis_off(id){
if (document.getElementById) { // DOM3 = IE5, NS6
document.getElementById(id).style.display = 'none';
obj = document.getElementById(id);
obj.style.visibility = "hidden";
}
}
function ShowHide()
{
turn_vis_off("ads");
turn_vis_on("gamecontent");

}
document.getElementById("ads").style.zIndex = 100;
//timeoutID = setTimeout(ShowHide, 30000);
</script>

Can anyone please look into this and let me know the mistake i made. for reference you can see this url StartOnlineGames.com - Playing*Online Cricket 2011