

var getSmart = "<div id='homeflash'><object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0' width='460' height='240' id='flash_SF_teaser' align='middle'><param name='allowScriptAccess' value='sameDomain' /><param name='allowFullScreen' value='false' /><param name='movie' value='/images/home/flash_SF_teaser.swf' /><param name='quality' value='high' /><embed src='/images/home/flash_SF_teaser.swf' quality='high' width='460' height='240' name='flash_SF_teaser' align='middle' allowScriptAccess='sameDomain' allowFullScreen='false' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' /></object></div>";
var handheld = "<div id='homeflash'><object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0' width='460' height='210' id='flash_handheld' align='middle'><param name='allowScriptAccess' value='sameDomain' /><param name='allowFullScreen' value='false' /><param name='movie' value='/images/home/flash_handheld.swf?linkurl=/FPGA/handheld/' /><param name='quality' value='high' /><embed src='/images/home/flash_handheld.swf?linkurl=/FPGA/handheld/' quality='high' width='460' height='210' name='flash_handheld' align='middle' allowScriptAccess='sameDomain' allowFullScreen='false' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' /></object></div><div id='featureLinksContainer'><ul><li><a href='/FPGA/handheld/' title='Get the Handheld Design Toolbox' style='width:435px'>&#187; Get the Handheld Design Toolbox</a></li></ul></div>"
      
var bnrCkName = "bannerSwitch";
var ckExpiration = "31-Dec-2010 00:00:00";
function setBanner() {
    var flashElem = document.getElementById("roundedDisplayBox");
    var myCookie = getCookie(bnrCkName);
    if("0"==myCookie){
        flashElem.innerHTML = getSmart;
        setCookie(bnrCkName, "1", ckExpiration, "/", null, null);
    }
    else if("1"==myCookie){
        flashElem.innerHTML = handheld;
        setCookie(bnrCkName, "0", ckExpiration, "/", null, null);
    }
    else {
        flashElem.innerHTML = getSmart;
        setCookie(bnrCkName, "1", ckExpiration, "/", null, null);
    }
}
function setCookie(name, value, expires, path, domain, secure) {
    var curCookie = name + "=" + escape(value) +
        ((expires) ? "; expires=" + expires : "") +
        ((path) ? "; path=" + path : "") +
        ((domain) ? "; domain=" + domain : "") +
        ((secure) ? "; secure" : "");
    document.cookie = curCookie;
}
function getCookie(name) {
      var dc = document.cookie;
      var prefix = name + "=";
      var begin = dc.indexOf("; " + prefix);
      if (begin == -1) {
        begin = dc.indexOf(prefix);
        if (begin != 0) return null;
      } 
      else
        begin += 2;
      var end = document.cookie.indexOf(";", begin);
      if (end == -1)
        end = dc.length;
      return unescape(dc.substring(begin + prefix.length, end));
}
function popitup(url,width,height) {
	newwindow=window.open(url,'name','width='+width+',height='+height+',scrollbars=yes');
	if (window.focus) {newwindow.focus()}
	return false;
}
