﻿function star() {
  var width;
  var height;
  var old;
  ie4up = (document.all) ? 1 : 0;
  ns6up = (document.getElementById&&!document.all) ? 1 : 0;

  if (ns6up) {
    width = self.innerWidth;
  }
  else if (ie4up) {
    width = iecompattest().clientWidth;
  }

  old=0;
  width=Math.round(width-920)/2;
  height=Math.round(width/573*420);

  if ((ns6up||ie4up)&&(width>0)) {
    document.write("<div id=\"starouterl\"><img id=\"starl\" src=\"include/designs/black_rounded/images/starl.png\" width=\""+width+"\" height=\""+height+"\"><br><img id=\"community\" src=\"include/designs/black_rounded/images/community.png\"></div>");
	if (width>135) {
      document.write("<div id=\"starouterr\"><img id=\"starr\" src=\"include/designs/black_rounded/images/starr.png\" width=\""+width+"\" height=\""+height+"\"><br><br><div id=\"wspacer\"><script language=\"JavaScript\" src=\"http://pf.tradedoubler.com/pf/pf?a=1762220&cuid=374000&tid=3212&oe=ISO-8859-1&js=true\" charset=\"ISO-8859-1\"></script></div></div>");
    }
	resize(ie4up, old);
  }
}

function resize(ie4up, oldw) {
  var width = ie4up ? iecompattest().clientWidth : self.innerWidth;
  var neww = width;
  if(neww!=oldw) {
    width = Math.round((width-920)/2);
    if(width>250) {
      document.getElementById("starl").style.marginLeft=(width-250)+"px";
      document.getElementById("starr").style.marginRight=(width-250)+"px";
      document.getElementById("community").style.marginRight=Math.round(0.19*250)+"px";
      width = 250;
    }
    else {
      if(oldw>250) {
        document.getElementById("starl").style.marginLeft="0px";
        document.getElementById("starr").style.marginRight="0px";
        document.getElementById("community").style.marginRight="19%";
      }
    }
    var height = Math.round(width/573*420);
  
    document.getElementById("starl").style.width=width+"px";
    document.getElementById("starl").style.height=height+"px";
    document.getElementById("starr").style.width=width+"px";
    document.getElementById("starr").style.height=height+"px";
	document.getElementById("wspacer").style.marginLeft=Math.round((width-160)/2)+"px";
	
	if (width <= 135) {
	  document.getElementById("wspacer").style.display="none";
	}
	else {
	  document.getElementById("wspacer").style.display="";
	}

    var oldw=neww;
  }
  setTimeout('resize('+ie4up+','+oldw+')',700);
}

