I’m trying to help out a buddy. He purchased this script and asked if I could help. TheBearMay offered some code but it only works on every other page or if you hit refresh after the page loads. eg. Click on link below,follow by the link “sign up free” and cycle the links. It’s like an on/off switch.
[url]http://www.playtimefantasy.com/member.php
Here is the complete section for the im_win section:
/**
* Return code for IM window
function RetIM()
{
global $site;
global $im_width;
global $im_input;
global $im_height;
global $im_input_height;
global $boxbg;
global $tmpl;
$ID = (int)$_COOKIE[‘memberID’];
$im_width = strstr($im_width,’%’) ? $im_width : $im_width-1;
$im_win = $_COOKIE[‘im_win’] ? $
$add = ($tmpl == ‘rec’ || $tmpl == ‘rem’ || $tmpl == ‘rej’ || $tmpl == ‘ae9’) ? ‘<td width=”150″ height=”35″>’ . _t(“
$add1 = ($tmpl == ‘rec’ || $tmpl == ‘rem’ || $tmpl == ‘rej’ || $tmpl == ‘ae9’) ? ‘colspan=”2″‘ : “”;
$add3 = ($tmpl == ‘g4’ || $tmpl == ‘act’) ? “<br />”: “ | ”;
$s00 = _t(“
$s01 = _t(“
$s02 = _t(“
if ($search_hide)
{
$div_hide = “none”;
$div_show = “inline”;
}
else
{
$div_hide = “inline”;
$div_show = “none”;
}
$ret = “<div align=right>”;
$ret .= “<div id=”div_hide_$name2″ name=”div_hide
$ret .= “<a href=”javascript: void(0)” onClick=”javascript: ShowHideHide(document.getElementById(‘div_show_$name2′),document.getElementById(‘table_hide_$name2′));”>”.
$ret .= “</div>”;
$ret .= “<div id=”div_show_$name2″ name=”div_show
$ret .= “<a href=”javascript: void(0)” onClick=”javascript: ShowShowHide(document.getElementById(‘table_hide_$name2′),document.getElementById(‘div_hide_$name2′));”>”.
$ret .= “</div>”;
$ret .= “</div>”;
$out .= <<<EOF
<script language=”javascript”>
<!–
function imShowHide()
{
var im_win = document.getElementById(‘im_win’);
var show = document.getElementById(‘show’);
var hide = document.getElementById(‘hide’);
if (im_win.style.display == ‘none’)
{
document.cookie = “im_win=inline;”;
im_win.style.display = ‘inline’;
show.style.display= ‘none’;
hide.style.display = ‘inline’;
}
else
{
document.cookie = “im_win=none;”;
im_win.style.display = ‘none’;
show.style.display= ‘inline’;
hide.style.display = ‘none’;
}
}
window.onload=imShowHide;
–>
</script>
<table name=”zzz” width=”$im_width” cellspacing=”0″ cellpadding=”0″ class=”text” border=”0″>
<tr>
$add
<td width=”$im_width” bgcolor=”$boxbg” align=center height=20>
<a target=”_blank” href=”{$site[‘url’]}im.php”>$s00</a>$add3<a href=”javascript: void(0);” onClick=”javascript: imShowHide();”><div id=”show” style=”display:inline”>$s01</div><div id=”hide” style=”display:none”>$s02</div></a>
</td>
</tr>
<tr>
<td width=$im_width $add1>
<div name=”im_win” id=”im_win” style=”display: $im_win;”>
<IFRAME ID=”IFrameIMFL” name=”IFrameIMFL” FRAMEBORDER=”0″ SCROLLING=”NO” HEIGHT=”$im_height” WIDTH=”$im_width” SRC=”{$site[‘url’]}im.php”>
</IFRAME>
</div>
</td>
</tr>
EOF;
$out .= “</table>”;
$im_width = strstr($im_width,’%’) ? $im_width : $im_width+1;
if ($tmpl == ‘act’)
{
return DesignBoxContent ( _t(“
}
else if ($tmpl == ‘frt’ || $tmpl == ‘hip’)
{
return DesignBoxContent ( _t(“
}
else
{
return $out;
}
}
I sure hope this helps.