//<![CDATA[

var ImgSizes = new Array();
var min_menu_height = 500;

var header_str_1=' \
    <div id="banner_div" style="position:relative; width:100%; height:100px; border:1px ridge rgb(0,200,0);");"> \
<div style="position:relative; float:left; "> \
<div style="position:relative; margin-left:24px; margin-top:5px; font-size:1.2em; font-weight:bold; letter-spacing:0.3mm;"> \
<div style="position:relative; top:2px; left:2px; color:black;"> \
Michael J. Raupp, Ph.D. \
</div> \
<div style="position:absolute; top:0px; left:0px; color:rgb(0,255,0);"> \
Michael J. Raupp, Ph.D. \
</div> \
</div> \
<div style="position:relative; margin-left:50px; margin-top:5px; font-size:1em; letter-spacing:0.3mm;"> \
<div style="position:relative; top:2px; left:2px; color:black;"> \
Professor of Entomology \
</div> \
<div style="position:absolute; top:0px; left:0px; color:rgb(0,255,255);"> \
Professor of Entomology \
</div> \
</div> \
<div style="position:relative; margin-left:70px; margin-top:5px; font-size:0.9em; letter-spacing:0.3mm;"> \
<div style="position:relative; top:2px; left:2px; color:black;"> \
Extension Specialist \
</div> \
<div style="position:absolute; top:0px; left:0px; color:rgb(255,255,0);"> \
Extension Specialist \
</div> \
</div> \
</div> \
<a href="http://www.bugoftheweek.com/rss/bow.rss"> \
    <div id="rss_div" style="float:right; margin-right:0.3cm; color:cyan;"> \
<div style="position:relative; margin-left:70px; margin-top:5px; font-size:1.1em; letter-spacing:0.3mm; font-weight:bold;"> \
    <div style="position:relative; top:2px; left:2px; color:black;"> \
Follow The Bug Guy on RSS \
    </div> \
    <div style="position:absolute; top:0px; left:0px; color:rgb(255,255,255);"> \
Follow The Bug Guy on RSS \
    </div> \
</div> \
    </div> \
</a> \
    </div> \
';

function setBannerBackground() {
    var d = document.getElementById("banner_div");
    if (d) {
	d.style.backgroundImage='url("'+no_menu_banner+'")';
	d.style.cursor="pointer";
	d.setAttribute("onclick","window.location='http://www.bugoftheweek.com';");
	d.style.height="80px";
    }
}

function writeGuestBook () {
    ; // dummy
}
function writeHeader () {
    document.writeln('<script type="text/javascript" src="/js/current_bow.js"></script>');
    document.writeln(header_str_1);
    window.setTimeout("setBannerBackground();",500);
}
function writeFooter () {

}
function writePrettyPrint () {

}

/*
function blockImgRCEvents(evt) {
    evt=(evt?evt:event);
    var blockit=false;
    var elem = (evt.target?evt.target:(evt.srcElement?evt.srcElement:null));
    if (elem && elem.tagName && elem.tagName.toLowerCase()=="img") {
        if (evt.cancelBubble)
            evt.cancelBubble=true;
        //alert
        return false;
    }
    return (blockit);
}
// document.oncontextmenu=blockImgRCEvents;
*/

/*
function blockAllRCEvents(evt) {
    evt=(evt?evt:event);
    var blockit=false;
    var elem = (evt.target?evt.target:(evt.srcElement?evt.srcElement:null));
    //if (elem && elem.tagName && elem.tagName.toLowerCase()=="img") {
        if (evt.cancelBubble)
            evt.cancelBubble=true;
        //alert
        return false;
    //}
}
//document.oncontextmenu=blockAllRCEvents;
*/

//*********************IMAGES.JS **************************


function preloadImages (img_list){
     if (document.images) {
        var obj_list = new Array();
        for (var x=0; x<img_list.length; x++) {
            var i = new Image();
            i.src = img_list[x][0];
            if (img_list[x][1].length<2)
                i.img_link = "";
            else
                i.img_link = img_list[x][1];
            obj_list.push(i);
        }
        return (obj_list);
    }
    return null;
}

function onImageClick () {
    if (onImageClick.img_link)
        newWindow2(onImageClick.img_link,50,50,80);
}

function rotateSlides (img_obj_list, img_name) {
    rotateImages (img_obj_list, img_name,"slide_showx");
}

function rotateImages (img_obj_list, img_name, img_div) {
    if (!rotateImages.last_ndx)
        rotateImages.last_ndx = -1;
    var img_el = document.getElementById(img_div);
    var max = img_obj_list.length;
    var n = Math.round(Math.random()*10);
    var prefix = "http://www.raupplab.umd.edu/";

    while (n >= max || n == rotateImages.last_ndx) {
        n = Math.round(Math.random()*10);
    }

    rotateImages.last_ndx = n;
    var img_link = img_obj_list[n].img_link;

    if (n>=0 && n < max && document.images[img_name]) {
        document.images[img_name].src = img_obj_list[n].src;
        if (img_el && document.images[img_name].src=="") {
            //img_el.style.cursor="normal";
            //img_el.style.visibility="hidden";
            onImageClick.img_link=null;
        }
        else if (img_el) {
            img_el.style.visiblity="visible";
            if (img_link && img_link.length>1) {
                onImageClick.img_link=img_link;
                img_el.style.cursor="pointer";
                img_el.onclick=onImageClick;
            }
            else {
                //img_el.style.cursor="arrow";
                img_el.onclick="";
            }
        }
    }
}

function clearWindow (div_id, method, delay) {
    if (!clearWindow.d)
	clearWindow.d = document.getElementById(div_id);
    if (!clearWindow.method)
	clearWindow.method=method;
    if (!clearWindow.delay)
	clearWindow.delay=delay;
    if (!clearWindow.x)
	clearWindow.x = 0;
    if (!clearWindow.s) {
	clearWindow.s = clearWindow.d.innerHTML;
	clearWindow.s_len = clearWindow.s.length;
    }
    if (!clearWindow.method || clearWindow.method==1) {
	try {
	    if (clearWindow.x<clearWindow.s_len) {
		clearWindow.d.innerHTML=clearWindow.s.slice(clearWindow.x);
		clearWindow.x = clearWindow.x+4;
		window.setTimeout("clearWindow();", clearWindow.delay);
	    }
	    else
		return (true);
	}
	catch (ex) {
	    return (false);
	}
    }
    else if (clearWindow.method==2) {
	clearWindow.used_nums_list = null;
	if (clearWindow.x < clearWindow.s_len-1) {
	    var n = getPseudoRandom(clearWindow.s.length-1, clearWindow.used_nums_list);
	    clearWindow.s = clearWindow.s.slice(0,n)+" "+clearWindow.s.slice(n+10);
	    clearWindow.d.innerHTML = clearWindow.s; //clearWindow.s.slice(0,n)+"&nbsp;"+clearWindow.s.slice(n);
	    //clearWindow.d.innerHTML=clearWindow.s;
	    clearWindow.x = clearWindow.x + 10;
	    window.setTimeout("clearWindow();", clearWindow.delay);
	}
	else
	    return(true);
    }
    else if (clearWindow.method==3) {
	alert (clearWindow.d.style.zIndex);
    }
    return (false);
}


var LinkXFileNdx=0;

function writeLLink (LinkName,PromptName) {
   var cmd;
   var fixed_link = LinkName;

   var replace_targets=[["\n",""],["<br />",""],["<br>",""]];
   for (var x=0; x<replace_targets.length; x++) {
       fixed_link=replaceStringAll(fixed_link,String(replace_targets[x][0]),String(replace_targets[x][1]));
   }
    var n = fixed_link.toLowerCase().indexOf("http:");
    var click_link = fixed_link;
    if (n>0)
    click_link=fixed_link.substring(n);
   if ((navigator.appName=="Netscape" && parseInt(navigator.appVersion)<5) || (navigator.appName=="Microsoft Internet Explorer" && parseInt(navigator.appVersion)<8)) {
      cmd = "<a href=\""+click_link+"\">"+PromptName+"</a>";
      document.write(cmd);
   }
   else {
      var rname = "writelink"+(LinkXFileNdx++);
      cmd = '<a href="#'+rname+'" name="'+rname+'" onclick=\'javascript:newWindow2(\"'+click_link+'\",50,50,80);\'>'+PromptName+'</a>';
      document.write(cmd);
   }
   return(cmd);
}


function eggQuiz(rollover_id,quiz_id,action,side) {
    var rid = document.getElementById(rollover_id);
    var qid = document.getElementById(quiz_id);
    var mess_id;
    if (quiz_id == "EggQuiz1") {
        mess_id = document.getElementById("quiz1_mess");
    }
    else if (quiz_id == "EggQuiz2") {
        mess_id = document.getElementById("quiz2_mess");
    }
    else if (quiz_id == "EggQuiz3") {
        mess_id = document.getElementById("quiz3_mess");
    }
    else if (quiz_id == "EggQuiz4") {
        mess_id = document.getElementById("quiz4_mess");
    }
    if (mess_id) {
        setText(mess_id,"");
    }
    if (rid && qid) {
        var rid_pos = getElementPosition(rollover_id);
        if (rid_pos) {
            qid.style.top=(parseInt(rid_pos.top)-60)+"px";
            if (side == "left") {
                qid.style.left=(parseInt(rid_pos.left)+parseInt(rid.style.width)-80)+"px";
            }
            else if (side == "RIGHT") {
                qid.style.left=(parseInt(rid_pos.left)-parseInt(qid.style.width)+80)+"px";
            }
            if (action==1) {
                qid.style.visibility="visible";
            }
            else {
                ; //qid.style.visibility="hidden";
            }
        }
    }
}

// old stuff****************************************

displayVideo.video_list = new Array();

function restartApplet (applet_name) {
    //window.location.href=window.location.href+"#"+applet_name;
    window.location.href=window.location.href;
    var d = document.applet_name;
    if (d) {
	//d.start();
    }
}

function displayVideo (format, audio_enabled, filename, java_archive, float_pos, caption, width, height, vid_id) {
	var archive = java_archive;
	var video_id = "format"+video_list.length;
	if (vid_id)
		video_id = vid_id;
	var applet_name = video_id+"_applet";
	video_list.push(video_id);
	var w=336;
	if (typeof width != "undefined")
		w=width;
	var h=230;
	if (typeof height != "undefined")
		h=height;
	if (1==1) {
		var cmd = '\
			<a name="'+applet_name+'"></a> \
			<div id="'+video_id+'" style="position:relative; float:'+float_pos+'; \
			width:'+(w)+'px; padding:5px;margin:5px;border:3px ridge \
				rgb(0,128,0); z-index:1000;"> \
				<div id="mpg_player" style="position:static;">';
					if (format=="MPEG4" || format=="MP4") {
						if (archive==null)
							archive="mediaframe-mpeg4.jar,mediaframe-aac.jar";

							cmd = cmd+'<applet name="'+applet_name+'" code="mediaframe.mpeg4.MPEG4.class" archive="'+archive+'" width="'+width+'" height="'+height+'" mayscript="true"> \
							<param name="id" value="ID: "'+filename+'" /> \
							<param name="default_media"		value="'+filename+'" /> \
							<param name="pre_buffer"	value="50%" /> \
							<param name="playback"	value="auto_start" /> \
							<param name="loop"	value="true" /> \
							<param name="control_location" value="http://raupplab.umd.edu/video/icons" />';
							//<param name="pre_screen"		value="posters/pre.gif" /> \
							cmd = cmd + '<param name="pre_screen_loop"	value="false" />';
							cmd = cmd + '<param name="post_screen"		value="false" /> ';
							cmd = cmd + '<param name="post_screen_loop"	value="false" /> \
							<param name="audio"	  		value="'+(audio_enabled?"true":"false")+'" /> \
							<param name="smooth_video"		value="true" /> \
							<param name="video_license"		value="false" /> \
							<param name="allow_save"		value="false" /> \
						</applet>';
					}
					else if (format=="MPG" || format=="MPEG") {
						if (archive==null)
							archive = "mediaframe-mpeg1.jar";
						cmd = cmd+'<applet name="'+video_id+'_applet" code="mediaframe.mpeg1.MPEG1.class" archive="'+archive+'" width="'+(w)+'" height="'+(h)+'" mayscript="true">';
							cmd = cmd+'<param name="id" value="ID: '+filename+'" />';
							cmd = cmd + '<param name="video_license"		value="false" /> ';
							cmd = cmd + '<param name="allow_save"		value="false" /> ';
							cmd = cmd + '<param name="pre_buffer"  		value="25%" /> ';
							cmd = cmd + '<param name="audio"	  		value="'+(audio_enabled?"true":"false")+'" /> ';
							cmd = cmd + '<param name="default_media"		value="'+filename+'" /> ';
							cmd = cmd + '<param name="startup_volume"	value="100%" /> ';
							cmd = cmd + '<param name="loop"	 		value="true" /> ';
							cmd = cmd+'<param name="controls"	  		value="true" /> ';
							cmd = cmd + '<param name="playback"	  		value="AUTO_START" /> ';
							cmd = cmd + '<param name="feedback_agent"	value="true" /> ';
							cmd = cmd + '<param name="cache"	 		value="true" /> ';
							cmd = cmd + '<param name="target" 		value="_blank" /> ';
						cmd = cmd + '</applet>';
					}
				cmd = cmd + '</div>';
				cmd = cmd + '<div style="position:static; padding-top:3px; padding-left:1px; width:98%; font-weight:normal; font-size:0.8em; font-style:oblique; color:rgb(0,64,64);"> '+caption+' <a href="#" onclick=\'javascript:restartApplet("'+applet_name+'");\'>(if video fails to start, click *here*)</a></div>';
			cmd = cmd + '</div> <!-- video -->';
			document.writeln (cmd);
	} // if format=="MPG"
	return video_id;
}

function displayImage (ximg_src, align, width, caption, img_name, xsecond_img_src, second_img_width, link_text, top_adjust, hide_div) {
    var img_src=ximg_src;
    if (img_src.indexOf("/bugweek")==0)
	img_src="http://raupplab.umd.edu"+img_src;
    var second_img_src=xsecond_img_src;
    if (second_img_src.indexOf("/bugweek")==0)
	second_img_src="http://raupplab.umd.edu"+second_img_src;
    var top_offset = 0;
    if (top_adjust && top_adjust!=null)
	top_offset = top_adjust;
    var l_text="click *here* to see a larger image.";
    if (link_text) {
        l_text=link_text;
    }
    var hd=null;
    if (hide_div && hide_div!=null)
	hd=document.getElementById(hide_div);
    var second_img_name = img_name+"_lg";
    var caption2;
     //second_img_src.substring(0,second_img_src.lastIndexOf("."));
    if (navigator.appName.toUpperCase().indexOf("MICROSOFT")>=0) {
        caption2 = caption+'  <span style="color:rgb(0,0,211); cursor:pointer;" onclick = \'  javascript:newWindow2("'+second_img_src+'",50,50,80);\'>'+l_text+'</span>';
    }
    else {
        caption2 = caption+'  <span style="color:rgb(0,0,211); cursor:pointer;" onclick = \'  document.getElementById("'+second_img_name+'").style.display = "block";\'>'+l_text+'</span>';
    }
    var cmd='<div id="'+img_name+'" class=\"caption\" style="position:relative; margin:5px; float:'+align+'; width:'+width+'px;">';
    cmd += '<div><img src="'+img_src+'" name="'+img_name+'" usemap="#'+img_name+'" border="0" width="'+width+'" /></div>';
    if (second_img_src) {
	if (hd)
	    hd.style.display="none";
        cmd += '<div id="'+second_img_name+'" style="position:absolute; cursor:pointer;';
        if (align.toUpperCase() == "RIGHT") {
            var nleft = -400;
            var ntop = -100 + top_offset;
            cmd += ' left:'+(nleft)+'px; top:'+(ntop)+'px; ';
        }
        else if (align.toUpperCase() == "LEFT") {
            var ntop = -200 + top_offset;
            var nleft = 50;
            cmd += ' left:'+(nleft)+'px; top:'+(ntop)+'px; ';
        }

        cmd += ' display:none; z-index:600;" onclick=\'';
	if (hd)
	    cmd += 'document.getElementById("'+hide_div+'").style.display="block";';
	cmd += 'this.style.display="none";\'>';
            cmd += '<img name="'+second_img_name+'" src="'+second_img_src+'" width="'+second_img_width+'" border="0" />';
        cmd += '</div>';
        cmd += '<span class="Caption">'+caption2+'</span>';
    }
    else {
        cmd += '<span class="Caption">'+caption+'</span>';
    }
    cmd += '</div>';
    document.writeln(cmd);
}

//****************************** OGG video ********************************************

	function videoOGG (url, audio, float_dir, width, height, caption, applet_id, auto_play, loop) {
		this.url = url;
		this.audio = audio;
		this.float_dir = float_dir;
		this.width = width;
		this.height = height;
		this.caption = caption;
		this.applet_id = applet_id;
		this.wrapper_div_id = this.applet_id+"_wrapper";

		this.codebase = "/js/";
		this.code = "com.fluendo.player.Cortado.class";
		this.archive = "cortado-ovt-stripped-0.2.2-umd.jar";
		this.buff_size = "800";
		this.auto_play = true;
		if (auto_play)
			this.auto_play = auto_play;
		this.loop = true;
		if (loop)
			this.loop = loop;

		this.init = initVideoOGG;
		this.setBuffer = setVideoOGGBuffer;
		this.getWrapperID = getVideoOGGWrapperID;
	}
	function setVideoOGGBuffer (new_buff_size) {
	    this.buff_size = new_buff_size;
	}
	function getVideoOGGWrapperID () {
		return (this.wrapper_div_id);
	}

function initVideoOGG () {
    var cmd = '<div id="'+this.wrapper_div_id+'" style="position:relative; width:'+this.width+'px; float:'+this.float_dir+'; border:2px ridge rgb(0,64,0);">';
    cmd = cmd + '<applet id="'+this.applet_id+'" codebase="'+this.codebase+'" code="'+this.code+'" archive="'+this.archive+'" width="'+this.width+'" height="'+this.height+'">';
    cmd = cmd + '<param name="url" value="'+this.url+'" />';
    cmd = cmd + '<param name="live" value="false" />';
    cmd = cmd + '<param name="local" value="true"  />';
    cmd = cmd + '<param name="keepAspect" value="true" />';
    cmd = cmd + '<param name="video" value="true" />';
    cmd = cmd + '<param name="audio" value="'+(this.audio?"true":"false")+'" />';
    cmd = cmd + '<param name="bufferSize" value="'+this.buff_size+'" />';
    cmd = cmd + '<param name="seekable" value="auto" />';
    cmd = cmd + '<param name="autoPlay" value="'+(this.auto_play?"true":"false")+'" />';
    cmd = cmd + '<param name="loop" value="'+(this.loop?"true":"false")+'" />';
    cmd = cmd + '</applet>';
    cmd = cmd+'<div style="position:relative; font-size:0.8em; font-family:times,serif; width:98%; margin-left:1%; margin-top:1mm; line-height:0.9; color:rgb(0,0,0); ">';
    cmd = cmd + '<table style="width:100%;"><tr><td>'+this.caption+'</td>';
    cmd = cmd + '<td><div style="position:relative; float:right; border-left:1px ridge navy; font-size:0.9em; padding:1mm; line-height:1.1;">';
    cmd = cmd + '<div><a href="#" style="float:right;" onclick=\'var d = document.getElementById("'+this.applet_id+'"); d.doSeek(0.0);d.doPlay();\'>Play</a></div>';
    cmd = cmd + '<div><a href="#" style="float:right;" onclick=\'var d = document.getElementById("'+this.applet_id+'"); d.doStop();\'>Stop</a></div>';
    cmd = cmd + '</div>\n</td></table>\n</div>\n</div>';
    document.writeln(cmd);
}


function vote (txt_file_name, catagory, nominee) {
    voteReturn.catagory = catagory.toUpperCase();
    //voteReturn.dest_div = div_id;
    //var param = "session_token="+getCookie("mpda_session_token")+"&catagory=SAMPLE"+"&"+ assembleFormParameter(form);
    var param = "file_name="+txt_file_name+"&char_string="+catagory+"--"+nominee;
    ajaxCall("http://www.raupplab.umd.edu/raupplab_java/writeTextFile.jsp",param,"voteReturn");
}

function voteReturn () {
    if (voteReturn.xobj!=null && voteReturn.xobj.readyState==4){
	if (voteReturn.xobj.status == 200) {
	    alert ("Thank you for voting");
	    /*
	       var d = document.getElementById(voteReturn.dest_div);
	       if (d) {
	    // if (action=="")
	    d.innerHTML = voteReturn.xobj.responseText;
	    }
	    */
	}
	else {
	    alert (voteReturn.xobj.responseText);
	}
	voteReturn.xobj=null;
    }
}

function writeStinkBugList () {
    var list_stmt="";
    var div_stmt='<div id="parts_list" style="clear:both; position:relative; display:block; float:right; width:200px;  background-color:beige; font-size:10pt; padding:2mm; border-left:2px ridge rgb(139,69,19); border-right:3px ridge rgb(111,55,15); border-top:2px ridge rgb(139,69,19); border-bottom:3px ridge rgb(111,55,15); border-radius:20px; box-shadow: 8px 10px 10px rgba(0,0,0,0.5), inset 8px 10px 10px rgba(255,255,255,0.6); z-index:6000; margin:4mm;">\n';

	div_stmt += '<div  style="position:relative; font-size:12pt; font-weight:bold; width:100%; text-align:center;" >Learn more about the Marmorated Stink Bug </div>\n';
	div_stmt += '<div style="clear:both; position:relative; width:100%; height:1px; overflow:hidden; border:2px ridge black;"></div>\n';

	list_stmt += '<div class="popup_list_link" onclick="javascript:newWindow3(\'http://www.bugoftheweek.com/archive/BugOfWeek_46.html\',50,50,70);">Nov. 14, 2005. A stinker at the window</div>\n';
	list_stmt += '<div class="popup_list_link" onclick="javascript:newWindow3(\'http://www.bugoftheweek.com/archive/BugOfWeek_43C.html\',50,50,70);">Oct. 20, 2008. Home invaders II - A real stinker, Brown Marmorated Stink Bug</div>\n';
	list_stmt += '<div class="popup_list_link" onclick="javascript:newWindow3(\'http://www.bugoftheweek.com/archive/BugOfWeek_40D.html\',50,50,70);">Oct. 5, 2009. Gimme shelter - Brown Marmorated Stink Bug</div>\n';

	list_stmt += '<div class="popup_list_link" onclick="javascript:newWindow3(\'http://www.bugoftheweek.com/archive/BugOfWeek_15E.html\',50,50,70);">April 12, 2010.  What comes in must go out - Brown marmorated stink bug</div>\n';
	list_stmt += '<div class="popup_list_link" onclick="javascript:newWindow3(\'http://www.bugoftheweek.com/archive/BugOfWeek_35E.html\',50,50,70);">Sep. 6, 2010.  A gathering storm - <i>Halyomorpha halys</i></div>\n';

	list_stmt += '<div class="popup_list_link" onclick="javascript:newWindow3(\'http://www.bugoftheweek.com/archive/BugOfWeek_12F.html\',50,50,70);">March 21, 2011.  The wake up call for stink bugs - <i>Halyomorpha halys</i></div>\n';
	list_stmt += '<div class="popup_list_link" onclick="javascript:newWindow3(\'http://www.bugoftheweek.com/archive/BugOfWeek_36F.html\',50,50,70);">Sep. 6, 2011.  To eat a stink bug, part 1 - A curious reunion, Brown Marmorated Stink Bug and Chinese praying mantis</div>\n';
	list_stmt += '<div class="popup_list_link" onclick="javascript:newWindow3(\'http://www.bugoftheweek.com/archive/BugOfWeek_37F.html\',50,50,70);">Sep. 13, 2011.  To eat a stink bug, part 2 - Homegrown hospitality, Brown Marmorated Stink Bug meets the black and yellow garden spider</div>\n';
	list_stmt += '<div class="popup_list_link" onclick="javascript:newWindow3(\'http://www.bugoftheweek.com/archive/BugOfWeek_38F.html\',50,50,70);">Sep. 19, 2011.  To eat a stink bug, part 3 - Bug vs. Bug, Brown Marmorated Stink Bug meets the wheel bug.</div>\n';
	list_stmt += '<div class="popup_list_link" onclick="javascript:newWindow3(\'http://www.bugoftheweek.com/archive/BugOfWeek_39F.html\',50,50,70);">Sep. 26, 2011.  To eat a stink bug, part 4 - They eat dead things, Brown Marmorated Stink Bug becomes a meal for the European paper wasp.</div>\n';

    document.writeln(div_stmt);
    document.writeln(list_stmt);
    document.writeln('<br /></div>');
}

function writeSycamoreList () {
    var list_stmt="";
    var div_stmt='<div id="parts_list" style="clear:both; position:relative; display:block; float:right; width:200px;  background-color:beige; font-size:10pt; padding:2mm; border-left:2px ridge rgb(139,69,19); border-right:3px ridge rgb(111,55,15); border-top:2px ridge rgb(139,69,19); border-bottom:3px ridge rgb(111,55,15); border-radius:20px; box-shadow: 8px 10px 10px rgba(0,0,0,0.5), inset 8px 10px 10px rgba(255,255,255,0.6); z-index:6000; margin:4mm;">\n';

	div_stmt += '<div  style="position:relative; font-size:11pt; font-weight:bold; width:100%; text-align:center;" >Learn more about Lace Bugs and their predators </div>\n';
	div_stmt += '<div style="clear:both; position:relative; width:100%; height:1px; overflow:hidden; border:2px ridge black;"></div>\n';

	list_stmt += '<div class="popup_list_link" onclick="javascript:newWindow3(\'http://www.bugoftheweek.com/archive/BugOfWeek_22A.html\',50,50,70);">May 28, 2006. And may all your azaleas be white ----	    </div>\n';
	list_stmt += '<div class="popup_list_link" onclick="javascript:newWindow3(\'http://www.bugoftheweek.com/archive/BugOfWeek_15B.html\',50,50,70);">April 9, 2007 Spring leepers - Jumping spiders, Family Salticidae</div>\n';
	list_stmt += '<div class="popup_list_link" onclick="javascript:newWindow3(\'http://www.bugoftheweek.com/archive/BugOfWeek_21E.html\',50,50,70);">May 24, 2010. Aphid lions – Chrysopidae</div>\n';

    document.writeln(div_stmt);
    document.writeln(list_stmt);
    document.writeln('<br /></div>');
}


function writeWaspList () {
    var list_stmt="";
    var div_stmt='<div id="parts_list" style="clear:both; position:relative; display:block; float:right; width:200px;  background-color:beige; font-size:10pt; padding:2mm; border-left:2px ridge rgb(139,69,19); border-right:3px ridge rgb(111,55,15); border-top:2px ridge rgb(139,69,19); border-bottom:3px ridge rgb(111,55,15); border-radius:20px; box-shadow: 8px 10px 10px rgba(0,0,0,0.5), inset 8px 10px 10px rgba(255,255,255,0.6); z-index:6000; margin:4mm;">\n';

	div_stmt += '<div  style="position:relative; font-size:11pt; font-weight:bold; width:100%; text-align:center;" >Learn more about Hornets and Wasps </div>\n';
	div_stmt += '<div style="clear:both; position:relative; width:100%; height:1px; overflow:hidden; border:2px ridge black;"></div>\n';

	list_stmt += '<div class="popup_list_link" onclick="javascript:newWindow3(\'http://www.bugoftheweek.com/archive/BugOfWeek_27D.html\',50,50,70);">July 6, 2009. Stingers - Baldfaced hornets, <i>Dolichovespula maculata</i></div>\n';
	list_stmt += '<div class="popup_list_link" onclick="javascript:newWindow3(\'http://www.bugoftheweek.com/archive/BugOfWeek_42F.html\',50,50,70);">Oct. 17, 2011. A continental giant of the wasp world - European hornet</div>\n';
	list_stmt += '<div class="popup_list_link" onclick="javascript:newWindow3(\'http://www.bugoftheweek.com/archive/BugOfWeek_32F.html\',50,50,70);">Aug. 8, 2011. Summer stingers – Eastern yellowjackets</div>\n';
	list_stmt += '<div class="popup_list_link" onclick="javascript:newWindow3(\'http://www.bugoftheweek.com/archive/BugOfWeek_39F.html\',50,50,70);">Sep 26, 2011. Brown Marmorated Stink Bug becomes a meal for the European paper wasp</div>\n';
	list_stmt += '<div class="popup_list_link" onclick="javascript:newWindow3(\'http://www.bugoftheweek.com/archive/BugOfWeek_41D.html\',50,50,70);">Oct 12, 2009. Paper wasp, <i>Polistes exclamens</i></div>\n';
	//list_stmt += '<div class="popup_list_link" onclick="javascript:newWindow3(\'http://www.bugoftheweek.com/archive/BugOfWeek_39F.html\',50,50,70);">Sep 26, 2011. Brown Marmorated Stink Bug becomes a meal for the European paper wasp</div>\n';


    document.writeln(div_stmt);
    document.writeln(list_stmt);
    document.writeln('<br /></div>');
}

//]]>


