function feedback_form(){var a="<div id='feedback-form'>  <div class='ff-heading'>feedback / report bug</div>  <span class='ff-text'>tell us what you think...</span>  <form id='frm_feedback' type='post'><!-- <select id='sel_feedback_category' name='feedback_category' size='1'>	  <option value='general feedback' selected='selected'>general feedback</option>	  <option value='bug report'>bug report</option>	  <option value='feature request'>feature request</option>	</select> -->	<textarea id='ta_feedback_msg' name='feedback_message' cols='50' rows='7'></textarea>  </form></div";var b="<div id='div_send_feedback' class='button button_green rightfloat' style='margin-left: 10px' onclick='send_feedback()'>Send Feedback</div>";jQuery.facebox(a,"",b)}function send_feedback(){var a=document.getElementById("ta_feedback_msg");if(a.value==""){alert("Please enter a message");return}jQuery.post("/send_feedback.php",{fc:"feedback",fm:a.value},function(b){proc_send_resp(b)},"json");ff_msg("Sending message ...");jQuery.facebox.remove_footer_xtra()}function proc_send_resp(a){if(a.status=="OK"){ff_msg("thanks for your feedback!")}else{ff_msg("There was a problem sending your message.")}}function feedback_form_story(){var a="<div id='feedback-form'> <div class='ff-heading'>Tell your story</div> <form id='frm_feedback' type='post'>  <div class='ff-ta-label ff-text'>First name:</div>  <div class='ff-textfield'><input id='inp_feedback_name' name='feedback_name' type='text' size='30' maxlength='30' /></div>  <div class='ff-bodytext'>By submitting this story you agree to our privacy agreement and terms of use.</div>  <div class='ff-ta-label ff-text'>Your story:</div>  <textarea id='ta_feedback_msg' name='feedback_message' cols='50' rows='7'></textarea>  <div class='ff-checkbox'><input type='checkbox' id='feedback_permission_reprint' name='feedback_permission_reprint' checked='checked' /> We can reprint your story on College Postings</div>  <div class='ff-checkbox'><input type='checkbox' id='feedback_permission_share' name='feedback_permission_share' checked='checked' /> We can share your story with the media</div> </form></div";var b="<div id='div_send_feedback' class='button button_green rightfloat' style='margin-left: 10px' onclick='send_feedback_story()'>Submit</div>";jQuery.facebox(a,"",b)}function send_feedback_story(){try{var d=true;var b=field_validate("inp_feedback_name","your name");var c=field_validate("ta_feedback_msg","a message")}catch(g){return}var a=checkbox_is_checked("feedback_permission_reprint")?"yes":"no";var f=checkbox_is_checked("feedback_permission_share")?"yes":"no";if(d){jQuery.post("send_feedback.php",{fc:"CP story",fn:b,fm:c,fpp:a,fps:f},function(e){proc_send_resp_story(e)},"json");ff_msg("Sending message ...");jQuery.facebox.remove_footer_xtra()}}function proc_send_resp_story(a){if(a.status=="OK"){ff_msg("thanks for your story!")}else{ff_msg("There was a problem sending your message.")}}function field_validate(c,b){var a=document.getElementById(c);if(a.value==""){alert("Please enter "+b);a.focus();form_ok=false;throw"missing required field"}return a.value}function checkbox_is_checked(b){var a=document.getElementById(b);if(a!=null){return a.checked}else{return""}}function ff_msg(b){var a=document.getElementById("feedback-form");var c=a.firstChild;while(c!=null){sibling=c.nextSibling;a.removeChild(c);c=sibling}a.appendChild(document.createTextNode(b))}var tt_boxOffsetX=19;var tt_boxOffsetY=35;var tt_containerPos={x:0,y:0};var tt_boxPos={x:0,y:0,p:0};var tt_oBox=null;var tt_prev_id="";function getTtBoxPosition(d){var a=mouseCoords(d);var c=(a.x)+tt_boxOffsetX;var b=(a.y)+tt_boxOffsetY;return{x:c,y:b}}function tooltip(i,k,j,a,b,d,f,c){if(g_IE6){return}if(!i){var i=window.event}if(f!=null){tt_boxOffsetX=f}if(c!=null){tt_boxOffsetY=c}var m=document.getElementById(k);tt_containerPos=getPosition(m);var h=document.getElementById(j);if(b!=null){h.style.width=""+b+"px"}var g=document.getElementById(j+"-content");if(a!=tt_prev_id){var n=g.firstChild;while(n!=null){var l=n.nextSibling;g.removeChild(n);n=l}$(g).html(d);tt_oBox=document.getElementById(j);if(tt_oBox!=null){tt_boxPos=getTtBoxPosition(i);tt_oBox.style.top=tt_boxPos.y+"px";tt_oBox.style.left=tt_boxPos.x+"px";tt_oBox.style.display="block"}}}function tt_move(a){if(g_IE6){return}if(tt_oBox!=null){a=a||window.event;tt_boxPos=getTtBoxPosition(a);tt_oBox.style.top=tt_boxPos.y+"px";tt_oBox.style.left=tt_boxPos.x+"px"}}function tt_off(){if(g_IE6){return}if(tt_oBox!=null){tt_oBox.style.display="none"}}var g_IE=/msie|MSIE/.test(navigator.userAgent);var g_IE6=/msie|MSIE 6/.test(navigator.userAgent);function mouseCoords(a){if(a.pageX||a.pageY){return{x:a.pageX,y:a.pageY}}return{x:a.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,y:a.clientY+document.body.scrollTop+document.documentElement.scrollTop}}function getPosition(c){var b=0;var a=0;while(c.offsetParent){b+=c.offsetLeft;a+=c.offsetTop;c=c.offsetParent}b+=c.offsetLeft;a+=c.offsetTop;return{x:b,y:a}}function setTextNode(c,b){var a=3;if(c.hasChildNodes){oChild=c.firstChild;while((oChild!=null)&&(oChild.nodeType!=a)){oChild=oChild.nextSibling}if(oChild!=null){oChild.nodeValue=b}else{nodeText=document.createTextNode(b);c.appendChild(nodeText)}}else{nodeText=document.createTextNode(b);c.appendChild(nodeText)}}function add_rounded_corners(a){a.appendChild(create_rounded_corner("tl"));a.appendChild(create_rounded_corner("tr"));a.appendChild(create_rounded_corner("bl"));a.appendChild(create_rounded_corner("br"))}function create_rounded_corner(b){var a=document.createElement("div");a.setAttribute("class","rs5 rs5_"+b);a.className="rs5 rs5_"+b;if(g_IE){a.style.position="absolute";a.style.width="5px";a.style.height="5px";a.style.zIndex="5";if(b.indexOf("t")!=-1){a.style.top="0"}if(b.indexOf("b")!=-1){a.style.bottom="0"}if(b.indexOf("l",1)!=-1){a.style.left="0"}if(b.indexOf("r",1)!=-1){a.style.right="0"}a.style.backgroundImage="url(../images/rs_5_"+b+".png)"}return a}(function(a){a.fn.tipsy=function(b){b=a.extend({fade:false,gravity:"n"},b||{});var c=null,d=false;this.hover(function(){a.data(this,"cancel.tipsy",true);var e=a.data(this,"active.tipsy");if(!e){e=a('<div class="tipsy"><div class="tipsy-inner">'+a(this).attr("title")+'<div class="fixed-tooltip-cor fixed-tooltip-tl"></div><div class="fixed-tooltip-cor fixed-tooltip-tr"></div><div class="fixed-tooltip-cor fixed-tooltip-bl"></div><div class="fixed-tooltip-cor fixed-tooltip-br"></div></div></div>');e.css({position:"absolute",zIndex:100000});a(this).attr("title","");a.data(this,"active.tipsy",e)}var h=a.extend({},a(this).offset(),{width:this.offsetWidth,height:this.offsetHeight});e.remove().css({top:0,left:0,visibility:"hidden",display:"block"}).appendTo(document.body);var f=e[0].offsetWidth,g=e[0].offsetHeight;switch(b.gravity.charAt(0)){case"n":e.css({top:h.top+h.height,left:h.left+h.width/2-f/2}).addClass("tipsy-north");break;case"s":e.css({top:h.top-g,left:h.left+h.width/2-f/2}).addClass("tipsy-south");break;case"e":e.css({top:h.top+h.height/2-g/2,left:h.left-f}).addClass("tipsy-east");break;case"w":e.css({top:h.top+h.height/2-g/2,left:h.left+h.width}).addClass("tipsy-west");break}if(b.fade){e.css({opacity:0,display:"block",visibility:"visible"}).animate({opacity:1})}else{e.css({visibility:"visible"})}},function(){a.data(this,"cancel.tipsy",false);var e=this;setTimeout(function(){if(a.data(this,"cancel.tipsy")){return}var f=a.data(e,"active.tipsy");if(b.fade){f.stop().fadeOut(function(){a(this).remove()})}else{f.remove()}},100)})}})(jQuery);