
var _dialogPromptID=null;var _blackoutPromptID=null;function IEprompt(innertxt,def){that=this;var _isIE7=(navigator.userAgent.indexOf('MSIE 7')>0);this.wrapupPrompt=function(cancled){if(_isIE7){val=document.getElementById('iepromptfield').value;_dialogPromptID.style.display='none';_blackoutPromptID.style.display='none';document.getElementById('iepromptfield').value='';if(cancled){val='';}
promptCallback(val);}
return false;}
if(def==undefined){def='';}
if(_isIE7){if(_dialogPromptID==null){var tbody=document.getElementsByTagName("body")[0];tnode=document.createElement('div');tnode.id='IEPromptBox';tbody.appendChild(tnode);_dialogPromptID=document.getElementById('IEPromptBox');tnode=document.createElement('div');tnode.id='promptBlackout';tbody.appendChild(tnode);_blackoutPromptID=document.getElementById('promptBlackout');_blackoutPromptID.style.opacity='.9';_blackoutPromptID.style.position='absolute';_blackoutPromptID.style.top='0px';_blackoutPromptID.style.left='0px';_blackoutPromptID.style.backgroundColor='#555555';_blackoutPromptID.style.filter='alpha(opacity=90)';_blackoutPromptID.style.height=(document.body.offsetHeight<screen.height)?screen.height+'px':document.body.offsetHeight+20+'px';_blackoutPromptID.style.display='block';_blackoutPromptID.style.zIndex='50';_dialogPromptID.style.border='2px solid blue';_dialogPromptID.style.backgroundColor='#DDDDDD';_dialogPromptID.style.position='absolute';_dialogPromptID.style.width='330px';_dialogPromptID.style.zIndex='100';}
var tmp='<div style="width: 100%; background-color: blue; color: white; font-family: verdana; font-size: 10pt; font-weight: bold; height: 20px">Input Required</div>';tmp+='<div style="padding: 10px">'+innertxt+'<BR><BR>';tmp+='<form action="" onsubmit="return that.wrapupPrompt()">';tmp+='<input id="iepromptfield" name="iepromptdata" type=text size=46 value="'+def+'">';tmp+='<br><br><center>';tmp+='<input type="submit" value="&nbsp;&nbsp;&nbsp;OK&nbsp;&nbsp;&nbsp;">';tmp+='&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';tmp+='<input type="button" onclick="that.wrapupPrompt(true)" value="&nbsp;Cancel&nbsp;">';tmp+='</form></div>';_blackoutPromptID.style.height=(document.body.offsetHeight<screen.height)?screen.height+'px':document.body.offsetHeight+20+'px';_blackoutPromptID.style.width='100%';_blackoutPromptID.style.display='block';_dialogPromptID.innerHTML=tmp;_dialogPromptID.style.top=parseInt(document.documentElement.scrollTop+(screen.height/3))+'px';_dialogPromptID.style.left=parseInt((document.body.offsetWidth-315)/2)+'px';_dialogPromptID.style.display='block';document.getElementById('iepromptfield').focus();}else{promptCallback(prompt(innertxt,def));}}
function navControl(id)
{var div=document.getElementById(id);if(div.className=='bling')
div.className='goodbye';else
div.className='bling';return(false);}
function swap(id)
{return(navControl(id));}
function clearbox(field,clearwhat)
{if(field.value==clearwhat)
field.value="";else if(field.value=="")
field.value=clearwhat;}
function swap(id)
{return(navControl(id));}
function printout()
{window.print();}
function containsDOM(container,containee)
{var isParent=false;do
{if((isParent=container==containee))
break;containee=containee.parentNode;}while(containee!=null);return isParent;}
function checkMouseEnter(element,evt)
{if(element.contains&&evt.fromElement)
return!element.contains(evt.fromElement);else if(evt.relatedTarget)
return!containsDOM(element,evt.relatedTarget);}
function checkMouseLeave(element,evt)
{if(element.contains&&evt.toElement)
return!element.contains(evt.toElement);else if(evt.relatedTarget)
return!containsDOM(element,evt.relatedTarget);}
function check_character(myobj,commentid,limit,warning)
{var string_length=parseInt(myobj.value.length);var charleft=limit-string_length;if(charleft<0)
{window.alert(warning);myobj.value=myobj.value.substr(0,limit);document.getElementById("left_block_"+commentid.toString()).innerHTML=0;}
else
{document.getElementById("left_block_"+commentid.toString()).innerHTML=charleft;}}