function specials() {
var content = '';
content += '<TABLE WIDTH="135" BORDER="0" CELLSPACING="0" CELLPADDING="2" BGCOLOR="#0066CC">';
content += '';
content += '<TR>';
content += '<TD CLASS="Nav2Header" WIDTH="5%">&nbsp;</TD><TD CLASS="Nav2Header" WIDTH="95%" COLSPAN="2">Special Reports</TD>';
content += '</TR>';
content += '<TR><TD CLASS="Nav2SectionChevron" WIDTH="10%" COLSPAN="2" ALIGN="RIGHT" VALIGN="TOP">&#0155;</TD><TD CLASS="Nav2Section" WIDTH="90%"><A HREF="/NASApp/cs/ContentServer?pagename=thestar/Render&c=Page&cid=1121076611710" CLASS="Nav2SectionLink">Cellphone Risks</A></TD></TR>';
content += '<TR><TD CLASS="Nav2SectionChevron" WIDTH="10%" COLSPAN="2" ALIGN="RIGHT" VALIGN="TOP">&#0155;</TD><TD CLASS="Nav2Section" WIDTH="90%"><A HREF="/NASApp/cs/ContentServer?pagename=thestar/Render&c=Page&cid=1121076610890" CLASS="Nav2SectionLink">London Bombing</A></TD></TR>';
content += '<TR><TD CLASS="Nav2SectionChevron" WIDTH="10%" COLSPAN="2" ALIGN="RIGHT" VALIGN="TOP">&#0155;</TD><TD CLASS="Nav2Section" WIDTH="90%"><A HREF="/NASApp/cs/ContentServer?pagename=thestar/Render&c=Page&cid=1120816986403" CLASS="Nav2SectionLink">Tour de France</A></TD></TR>';
content += '<TR><TD CLASS="Nav2SectionChevron" WIDTH="10%" COLSPAN="2" ALIGN="RIGHT" VALIGN="TOP">&#0155;</TD><TD CLASS="Nav2Section" WIDTH="90%"><A HREF="/NASApp/cs/ContentServer?pagename=thestar/Render&c=Page&cid=994241320037" CLASS="Nav2SectionLink">Short Story Contest</A></TD></TR>';
content += '<TR><TD CLASS="Nav2SectionChevron" WIDTH="10%" COLSPAN="2" ALIGN="RIGHT" VALIGN="TOP">&#0155;</TD><TD CLASS="Nav2Section" WIDTH="90%"><A HREF="/NASApp/cs/ContentServer?pagename=thestar/Render&c=Page&cid=1112868433979" CLASS="Nav2SectionLink">Karla Homolka</A></TD></TR>';
content += '<TR><TD CLASS="Nav2SectionChevron" WIDTH="10%" COLSPAN="2" ALIGN="RIGHT" VALIGN="TOP">&#0155;</TD><TD CLASS="Nav2Section" WIDTH="90%"><A HREF="/NASApp/cs/ContentServer?pagename=thestar/Render&c=Page&cid=1119521026064" CLASS="Nav2SectionLink">Native Education</A></TD></TR>';
content += '<TR><TD CLASS="Nav2SectionChevron" WIDTH="10%" COLSPAN="2" ALIGN="RIGHT" VALIGN="TOP">&#0155;</TD><TD CLASS="Nav2Section" WIDTH="90%"><A HREF="/NASApp/cs/ContentServer?pagename=thestar/Render&c=Page&cid=1034676683947" CLASS="Nav2SectionLink">[More Specials]</A></TD></TR>';
content += '';
content += '</TABLE>';
content += '';
content += '';
content += '';
content += '';
content += '';
content += '';
document.write(content);
}

function feature() {
var content = '';
content += '<TABLE width="100%" border="0" cellspacing="0" cellpadding="0" bgcolor="#CCCCCC"><tr><FORM><td colspan="5" class="expull1"><SELECT name="ExtraSections" class="expull1" onChange="MM_jumpMenu(\'parent\',this,0)"> <OPTION VALUE="#">Feature Sections';
content += '<OPTION VALUE="#">----------';
content += '<OPTION VALUE="/NASApp/cs/ContentServer?pagename=thestar/Render&c=Page&cid=971794782442">@Biz</OPTION><OPTION VALUE="/NASApp/cs/ContentServer?pagename=thestar/Render&c=Page&cid=1011789353817">Books</OPTION><OPTION VALUE="/NASApp/cs/ContentServer?pagename=thestar/Render&c=Page&cid=1105528094507">Buzz</OPTION><OPTION VALUE="/NASApp/cs/ContentServer?pagename=thestar/Render&c=Page&cid=1010666657320">Condos</OPTION><OPTION VALUE="/NASApp/cs/ContentServer?pagename=thestar/Render&c=Page&cid=973280119494">Fashion</OPTION><OPTION VALUE="/NASApp/cs/ContentServer?pagename=thestar/Render&c=Page&cid=968867496431">Food</OPTION><OPTION VALUE="/NASApp/cs/ContentServer?pagename=thestar/Render&c=Page&cid=968867505381">Health</OPTION><OPTION VALUE="/NASApp/cs/ContentServer?pagename=thestar/Render&c=Page&cid=968867497496">Homes</OPTION><OPTION VALUE="/NASApp/cs/ContentServer?pagename=thestar/Render&c=Page&cid=968867505075">I.D.</OPTION><OPTION VALUE="/NASApp/cs/ContentServer?pagename=thestar/Render&c=Page&cid=1105528093962">Ideas</OPTION><OPTION VALUE="/NASApp/cs/ContentServer?pagename=thestar/Render&c=Page&cid=976600361453">Movies</OPTION><OPTION VALUE="/NASApp/cs/ContentServer?pagename=thestar/Render&c=Page&cid=968867506610">Travel</OPTION><OPTION VALUE="/NASApp/cs/ContentServer?pagename=thestar/Render&c=Page&cid=978552666364">What\'s On</OPTION><OPTION VALUE="/NASApp/cs/ContentServer?pagename=thestar/Render&c=Page&cid=968867497088">Wheels</OPTION><OPTION VALUE="/NASApp/cs/ContentServer?pagename=thestar/Render&c=Page&cid=1021543364560">Your Home</OPTION></SELECT></td></FORM></tr><TR><td colspan="5" class="sat1">&nbsp;&nbsp;Today\'s Features</td></TR><TR>  <TD width="14"> <DIV align="right" class="satbull">&gt;&nbsp;</DIV> </TD> <TD class="sat"><a href="/NASApp/cs/ContentServer?pagename=thestar/Render&c=Page&cid=1011789353817">Books</a></TD>  <TD width="14"> <DIV align="right" class="satbull">&gt;&nbsp;</DIV> </TD> <TD class="sat"><a href="/NASApp/cs/ContentServer?pagename=thestar/Render&c=Page&cid=1105528094507">Buzz</a></TD></TR><TR>  <TD width="14"> <DIV align="right" class="satbull">&gt;&nbsp;</DIV> </TD> <TD class="sat"><a href="/NASApp/cs/ContentServer?pagename=thestar/Render&c=Page&cid=1105528093962">Ideas</a></TD></TR></TABLE>';
document.write(content);
}

function weather() {
var content = '';
content += '<table width="122" border="0" cellspacing="0" cellpadding="0">';
content += '<tr> ';
content += '<td class="weather1">Thunderstorms</td>';
content += '<td width="3">&nbsp;</td>';
content += '<td rowspan="3"><img src="/images/thestar/weather/icons/15.GIF" width="40" height="40"></td>';
content += '</tr>';
content += '<tr> ';
content += '<td class="weather1">H 28 / L 22</td>';
content += '<td width="3">&nbsp;</td>';
content += '</tr>';
content += '<tr> ';
content += '<td class="weather2">';
content += '<div align="left">';
content += '<NOBR><a href="/NASApp/cs/ContentServer?pagename=thestar/Render&c=Page&cid=971188561551">4 Day Forecast</a></NOBR></div>';
content += '</td>';
content += '<td width="3">&nbsp;</td>';
content += '</tr>';
content += '</table>';
content += '';
content += '';
content += '';
content += '';
content += '';
document.write(content);
}




function checkforblanks(){
  for (var i = 0; i < arguments.length; i += 2){
    if (!arguments[i])	{
	alert("The search field is empty. Please enter text to search Thestar.com.");
	return false;
    }
  }
  return true;
}

function visit( elem ) { 
    i = 0;
    while (i < elem.options.length) {
        if (elem.options[i].selected) {
            newURL = elem.options[i].value;
            break;
        }
        i++;
    }
  if (newURL != "") {
    document.location.href=newURL;
  } else {
        return 0;
  }
}

function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

function validate(theform) {
  var isFull = checkforblanks(theform.searchstring.value, "Search String");
  if (!isFull)
    {return false;}
}		

function gallery_open( sitename, galleryid, h, w ) {
        var GalleryWindow;
        var pagename = sitename + '/Render';
        if (h == null) {
            h = 500;
        }
        if (w == null) {
            w = 488;
        }
        pagename='thestar/Render';
        var url = '/NASApp/cs/ContentServer?pagename='+pagename+'&c=Gallery&cid=' + galleryid;
        GalleryWindow = window.open( url, 'gallery_window', 'height=' + h + ',width=' + w + ',screenX=10,screenY=10,top=10,left=100,resizable=yes,scrollbars=yes' );
        if (GalleryWindow.opener == null) {
                GalleryWindow.opener = self;
        }

        GalleryWindow.focus();

}

function goTo( url ){
        document.location= url;
        return 1;
}

function view_gallery( sitename, galleryid, h, w, t, iid ) {
        var GalleryWindow;
        var pagename = sitename + '/Render';
        if (h == null) {
            h = 500;
        }
        if (w == null) {
            w = 488;
        }
        pagename='thestar/Render';
        var url = '/NASApp/cs/ContentServer?pagename='+pagename+'&c=Gallery&cid=' + galleryid + '&t=' + t + '&colid=' + iid;
        GalleryWindow = window.open( url, 'gallery_window', 'height=' + h + ',width=' + w + ',screenX=10,screenY=10,top=10,left=100,resizable=yes,scrollbars=yes' );
        if (GalleryWindow.opener == null) {
                GalleryWindow.opener = self;
        }

        GalleryWindow.focus();

}

function getCookie(name){
var cname = name + "=";
var dc = document.cookie;
if(dc.length >0){
   begin = dc.indexOf(cname);
   if(begin != -1 ) {
      begin += cname.length;
      end = dc.indexOf(";", begin);
      if (end == -1) end = dc.length;
        return unescape(dc.substring(begin,end));
      }
   }
return null;
}

function setLongCookie(name, value) {
 var today=new Date();
 var expiry = new Date(today.getTime() + 366*24*3600*1000);
  if(value !=null && value != "")
   document.cookie=name + "=" + escape(value) + "; expires=" + expiry.toGMTString()+"; path=/";
}

function getDomain(){
        url=document.location+"";
        if(url.indexOf("://")==-1){return "-";}
        rest=url.substring(url.indexOf("://")+3);
        domain=rest.substring(0,rest.indexOf("/"));
        return domain;
}

if(getCookie("gx_session_id_")){
        if(!getCookie("starAccess")){
                setLongCookie("starAccess", "Star-"+getCookie("gx_session_id_")+"||"+getDomain());
        }
        else{
                oldCookie=getCookie("starAccess");
                if(oldCookie.indexOf("||")==-1){ thisCookie=oldCookie+"||"+getDomain();}
                else{thisCookie=oldCookie;}
                setLongCookie("starAccess", thisCookie);
        }
}

  IE5 = ((document.all)&&(navigator.appVersion.indexOf("MSIE 5.")!=-1)) ? true : false;
  IE6 = ((document.all)&&(navigator.appVersion.indexOf("MSIE 6.")!=-1)) ? true : false;
  IE5plus = IE5 || IE6;

  if(IE5plus) {
    window.onbeforeprint = trackPrint;

    function trackPrint() {
      var printimg = new Image();
      printimg.src="http://www3.thestar.com/print/page_printed.gif";
    }
  }

function firstpopup( iUrl ) {
	var params = 'left=10,top=10,width='+(window.screen.width-50)+',height='+(window.screen.height-50)+',toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes';
	this.open(iUrl,'',params);
}

function getRandom() {
	return Math.floor(1000000*Math.random());
}

