function changeto(form){
    var myindex = form.CategorySearch.selectedIndex;

    if (form.CategorySearch.options[myindex].value != "0") {
      location = form.CategorySearch.options[myindex].value;
    }
}

function Marquee(marquee_text, marquee_textcolor, marquee_textlinkcolor, marquee_fonttype, marquee_speed, marquee_bgcolor, link, statusBarText) {
  document.write('<applet code="iscroll.class" codebase="../classes" width="620" height="18"><param name="Notice" value="Applet by www.CodeBrain.com" > <param name="Text" value="' + marquee_text + '" > <param name="TextColor" value="' + marquee_textcolor + '" > <param name="TextLinkColor" value="' + marquee_textlinkcolor + '" > <param name="VerticalBias" value="0" > <param name="FontName" value="' + marquee_fonttype + '" > <param name="FontStyle" value="0" > <param name="Speed" value="' + marquee_speed + '" > <param name="Pause" value="0" > <param name="BackgroundColor" value="' + marquee_bgcolor + '" > <param name="MouseMode" value="1" > <param name="StatusBarText" value="' + statusBarText + '" >  Please use a Java-enabled browser to see the scrolling marquee. </applet>');
}

function changePromoView(sortField, sortOrder) {
  document.search.sortField.value = sortField;
  document.search.sortOrder.value = sortOrder;
  document.search.submit();
}

function Set_Cookie( name, value, expires, path, domain, secure ) {
    // set time, it's in milliseconds
    var today = new Date();
    today.setTime( today.getTime() );

    /*
    if the expires variable is set, make the correct
    expires time, the current script below will set
    it for x number of days, to make it for hours,
    delete * 24, for minutes, delete * 60 * 24
    */
    if ( expires ){
        expires = expires * 1000 * 60 * 60 * 24;
    }

    var expires_date = new Date( today.getTime() + (expires) );

    document.cookie = name + "=" +escape( value ) +
    ( ( expires ) ? ";expires=" + expires_date.toGMTString() : "" ) +
    ( ( path ) ? ";path=" + path : "" ) +
    ( ( domain ) ? ";domain=" + domain : "" ) +
    ( ( secure ) ? ";secure" : "" );
}

//Set_Cookie('hideprizedraw', '', 0, '/', '', '' );

function closePrizeDraw(){
  if (document.getElementById('donotshow').checked == true) {
    Set_Cookie('hideprizedraw', 'true', 120, '/', '', '' );
  }
  opacity('overlay2', 92, 0, 750);
  setTimeout(function(){document.getElementById('overlay2').style.display = 'none'}, 700);
}