//head tag: <script src="anim/runjava.js" type="text/javascript"></script>
//banner Tag: <script type="text/javascript">RunBanner();</script>
//nav Tag: <script type="text/javascript">RunNav();</script>

function RunIntro()
{
document.write('<object id="obj1" border="0" width="800" height="130" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"       classid="clsid:D27CDB6E-AE6D-11CF-96B8-444553540000">\n');
document.write('<param name="movie" value="anim/intro.swf">\n');
document.write('<param name="quality" value="High">\n');
document.write('<embed src="anim/banner.swf" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" name="obj1" width="800" height="130">\n');
document.write('</object>\n');
}

function RunBanner()
{
document.write('<object id="obj3" border="0" width="800" height="130" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"       classid="clsid:D27CDB6E-AE6D-11CF-96B8-444553540000">\n');
document.write('<param name="movie" value="anim/banner.swf">\n');
document.write('<param name="quality" value="High">\n');
document.write('<embed src="anim/banner.swf" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" name="obj3" width="800" height="130">\n');
document.write('</object>\n');
}

function RunNav()
{
document.write('<object classid="clsid:D27CDB6E-AE6D-11CF-96B8-444553540000" id="obj2"      codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" border="0" width="150" height="300">\n');
document.write('<param name="movie" value="anim/nav.swf">\n');
document.write('<param name="quality" value="High">\n');
document.write('<embed src="anim/nav.swf" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" name="obj2" width="150" height="300">\n');
document.write('</object>\n');
}

function bookmark(url,title){
  if ((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4)) {
  window.external.AddFavorite(url,title);
  } else if (navigator.appName == "Netscape") {
    window.sidebar.addPanel(title,url,"");
  } else {
    alert("Press CTRL-D (Netscape) or CTRL-T (Opera) to bookmark");
  }
}

function EmailLink(){
window.location = "mailto:"+"?subject=Check out Power Tie Marketing!" + "&body="+document.title+"  "+window.location;
}

function goToURL() { 
window.location = "http://www.powertiemarketing.com/web_design_pricing.htm"; 
}

function move_box(an, box) {
  var cleft = 0;
  var ctop = 0;
  var obj = an;
  while (obj.offsetParent) {
    cleft += obj.offsetLeft;
    ctop += obj.offsetTop;
    obj = obj.offsetParent;
  }
  box.style.left = cleft + 'px';
  ctop += an.offsetHeight + 0;
  if (document.body.currentStyle &&
    document.body.currentStyle['marginTop']) {
    ctop += parseInt(
      document.body.currentStyle['marginTop']);
  }
  box.style.top = ctop + 'px';
}

function show_hide_box(an, width, height, borderStyle) {
  var href = an.href;
  var boxdiv = document.getElementById(href);

  if (boxdiv != null) {
    if (boxdiv.style.display=='none') {
      move_box(an, boxdiv);
      boxdiv.style.display='block';
    } else
      boxdiv.style.display='none';
    return false;
  }

  boxdiv = document.createElement('div');
  boxdiv.setAttribute('id', href);
  boxdiv.style.display = 'block';
  boxdiv.style.position = 'absolute';
  boxdiv.style.width = width + 'px';
  boxdiv.style.height = height + 'px';
  boxdiv.style.border = borderStyle;
  boxdiv.style.backgroundColor = '#fff';

  var contents = document.createElement('iframe');
  contents.scrolling = 'no';
  contents.frameBorder = '0';
  contents.style.width = width + 'px';
  contents.style.height = height + 'px';
  contents.src = href;

  boxdiv.appendChild(contents);
  document.body.appendChild(boxdiv);
  move_box(an, boxdiv);

  return false;
}
