function display_pagewide_msg(custom_msg,auto_hide,click_hide,highlight){if(custom_msg){set_msg=custom_msg;set_msg=set_msg.replace(/\n/g,"<br/>");}else{set_msg="Please wait...";};if(!getele("pagewide_msg_box")){var indicator_bg=document.createElement("div");indicator_bg.setAttribute("id","pagewide_msg_bg");indicator_bg.style.position="absolute";indicator_bg.style.width="100%";indicator_bg.style.height="100%";indicator_bg.style.backgroundColor="white";indicator_bg.style.filter="alpha(opacity=75)";indicator_bg.style.opacity=".75";indicator_bg.style["-moz-opacity"]="0.75";indicator_bg.style.zIndex="99998";var indicator=document.createElement("div");indicator.setAttribute("id","pagewide_msg_box");indicator.style.position="absolute";indicator.style.padding="25px";indicator.style.color="#444444";indicator.style.backgroundColor="#DFDFDF";indicator.style.border="solid #AAAAAA 1px";indicator.style.zIndex="99999";check_support(document.getElementsByTagName,"document.getElementsByTagName");var thebody=document.getElementsByTagName("body")[0];if(!thebody){js_error("Could not body of the document.");};thebody.appendChild(indicator_bg);thebody.appendChild(indicator);};var center_xy=get_window_center();var scrolled_xy=get_scrolled_xy();if(getele("pagewide_msg_bg")){curr_bg=getele("pagewide_msg_bg");curr_bg.style.width=(center_xy[0]*2)+"px";curr_bg.style.height=scrolled_xy[1]+((center_xy[1]-scrolled_xy[1])*2)+"px";curr_bg.style.left="0px";curr_bg.style.top="0px";curr_bg.style.display="block";};curr_indic=getele("pagewide_msg_box");if(set_msg.length>23){curr_indic.innerHTML=set_msg;curr_indic.style.width="450px";curr_indic.style.height="200px";curr_indic.style.textAlign="left";}else{curr_indic.innerHTML="<b>"+set_msg+"</b>";curr_indic.style.width="200px";if(navigator.userAgent.indexOf("Firefox")>-1){curr_indic.style.height="14px";}else{curr_indic.style.height="50px";};curr_indic.style.textAlign="center";};curr_indic.style.left=(center_xy[0]-parseInt(curr_indic.style.width)/2)+"px";curr_indic.style.top=(center_xy[1]-parseInt(curr_indic.style.height)/2)+"px";curr_indic.style.display="block";if(click_hide){curr_indic.innerHTML=curr_indic.innerHTML+"<br/><br/><center>[ <a href=\"javascript:hide_pagewide_msg();\"><b>"+(typeof(click_hide)=="string"?click_hide:"OK")+"</b></a> ]</center>";};if(auto_hide){setTimeout("hide_pagewide_msg()",auto_hide);};if(highlight){setTimeout("highlight_pagewide_msg(1)",450);document.custom_pgwid_start=new Date().getTime();};};function highlight_pagewide_msg(newstat){curr_indic=getele("pagewide_msg_box");if(curr_indic.style.display=='block'){if(newstat){curr_indic.style.borderColor="red";time_diff=new Date().getTime()-document.custom_pgwid_start;if(time_diff>7000&&time_diff<12000){curr_indic.style.borderWidth="2px";}else if(time_diff>12000){curr_indic.style.borderWidth="3px";};nextstat=0;}else{curr_indic.style.borderColor="#AAAAAA";nextstat=1;};setTimeout("highlight_pagewide_msg("+nextstat+")",450);};};function change_pagewide_msg(msg){obj_box=getele("pagewide_msg_box");if(!obj_box||obj_box.style.display=="none"){display_pagewide_msg(msg);}else{obj_box.innerHTML="<b>"+msg+"</b>";};};function hide_pagewide_msg(){if(getele("pagewide_msg_box")){getele("pagewide_msg_box").style.display="none";if(getele("pagewide_msg_bg")){getele("pagewide_msg_bg").style.display="none";};curr_indic.style.borderWidth="1px";};};function popup_form(html,fields,req_fields,static_fields,ws,response_format,post_actions){var selected=new Object();var allhtml="<form>";allhtml+=html;allhtml+="<table width=\"100%\"><tr><td><input type=\"button\" value=\"Cancel\" onclick=\"hide_pagewide_msg();\"></td><td align=\"right\"><input type=\"button\" value=\"&nbsp; OK &nbsp;\" onclick=\"";allhtml+="popup_form_internalcallback(";allhtml+=JSON.stringify(fields).replace(/\"/g,"&quot;")+", ";allhtml+=JSON.stringify(req_fields).replace(/\"/g,"&quot;")+", ";allhtml+=JSON.stringify(static_fields).replace(/\"/g,"&quot;")+", ";allhtml+="'"+ws+"', '"+response_format+"', "+JSON.stringify(post_actions).replace(/\"/g,"&quot;")+");\"></td></tr></table>";allhtml+="</form>";display_pagewide_msg(allhtml);};function popup_form_internalcallback(fields,req_fields,static_fields,ws,response_format,post_actions){var currwsarg,errmsg;var parms=new Object();outer_loop:for(var i in fields){currwsarg=fields[i];parms[currwsarg]=get_field_value(i);if(parms[currwsarg].length==0){for(var j in req_fields){if(req_fields[j]==i){errmsg="A field has not been filled out but is required ("+i+").";break outer_loop;};};};};if(errmsg){alert(errmsg);}else{for(var k in static_fields){parms[k]=static_fields[k];};hide_pagewide_msg();standard_ws_call(ws,parms,response_format,post_actions);};}
/*** Powered by phpJSO -- http://www.comrax.com/phpJSO ***/
/*** Copyright © 2006 WinterNet Studio, Allan Jensen (www.winternet.no). All rights reserved. (Except on code not produced by WinterNet Studio) ***/