var main_js_ver="0.7.9";var main_site_ver="2.5";var WindowObjectReference;var help_menu="<table width=\"100\" cellspacing=\"1\" cellpadding=\"4\" border=\"0\" class=\"tableinborder\"><tr><td class=\"tabletitle\"><div align=\"center\"><a href=\"javascript:;\" onclick=\"mClose();\">Help Menu</a></div></td></tr><tr><td class=\"tableb\"><div align=\"center\"><a href=\"javascript:;\" onclick=\"openRequestedPopup();\">Chat</a></div></td></tr><tr><td class=\"tableb\"><div align=\"center\"><a href=\"rules.php\">Rules</a></div></td></tr><tr><td class=\"tableb\"><div align=\"center\"><a href=\"faq.php\">F.A.Q</a></div></td></tr><tr><td class=\"tableb\"><div align=\"center\"><a href=\"staff.php\">Staff</a></div></td></tr></table>";var loading_msg="<div align=center><font color=red><b>Loading...</b></font></div><div align=center><img src=pic/ajax-loader.gif></div>";try
{if(!ajax_ok)ajax_ok="Action Ok";}
catch(err)
{var ajax_ok="Action Ok!";}
var cKy = false;
function drag(ev) { if (ev == 1) cKy = true; else cKy = false; }
function update_core(rvs,force){if(!force||force!=1){var changes="<center>Please wait while SceneFZ is updating your cached scripts to version "+rvs+"!<br><br></center><div align=left>What's New?</b><br>"+c+"</div>";var body="<table border=\"0\" cellspacing=\"0\" cellpadding=\"4\" class=\"tableinborder\"><tr><td class=tabletitle><img src=\"pic/error.png\" border=\"0\" title=\"Updating scripts...\"/></td><td class=tabletitle id=dragcap><b> SceneFZ.net - New Features</b></td><td class=\"tabletitle\" align=\"right\"><a href=\"javascript:;\" onclick=\"mClose();\"><img src=\"pic/close.png\" border=\"0\"/></a></td></tr><tr><td class=\"tablea\" colspan=\"3\">"+changes+"</td></tr><tr><td class=\"tablea\" colspan=\"3\" style=\"text-align:center;\"><input type=\"button\" value=\"Update Now!\" onclick=\"update_core('"+realvs+"',1);\" />&nbsp;&nbsp;<input type=\"button\" value=\"Close\" onclick=\"mClose();\" /><br><div align=left><small>Updating automaticaly in 15 seconds!</small></div></td></tr></table>";coolTip(body,CENTERPOPUP,STICKY,EXCLUSIVE,DRAGGABLE,ALTCUT);setTimeout("window.location.reload(true)",15000);}else{window.location.reload(true);}}
function get(id){var isDOM=(document.getElementById?true:false);var isIE4=((document.all&&!isDOM)?true:false);var isNS4=(document.layers?true:false);var isNS=navigator.appName=="Netscape";if(isDOM){if(document.getElementById(id))
return document.getElementById(id);}else if(isIE4){if(document.all[id])
return document.all[id];}else if(isNS4){if(document.layers[id])
return document.layers[id];}else error('<b>Your browser does not handle javascript correctly, please change it!</b>');}
function openRequestedPopup()
{WindowObjectReference=window.open("/chat/index.php","_blank","width=720,height=420,directories=no,location=no,menubar=no,status=no,titlebar=no,toolbar=no");return WindowObjectReference;}
function add_rating(tid,rating){if(!tid||!rating||rating<=0||rating>5)return;do_update('trating',"ajax_rate.php?id="+tid+"&rating="+rating);document.body.style.cursor='auto';}
function rate_over(star){if(star==0){document.body.style.cursor='auto';for(i=1;i<=5;i++)
get('star'+i).src="pic/starbige.png";return;}
document.body.style.cursor='pointer';for(i=1;i<=star;i++)
get('star'+i).src="pic/starbig.png";}
function mClose()
{cClick();}
function add_new_post(url,firstcomm){var frameid="post_res";var pid=window.frames[frameid].document.body.innerHTML;if(pid&&pid.match(/[a-z]/))
{mClose();error(pid);window.frames[frameid].document.body.innerHTML="";return;}
if(!pid||!pid.match(/[\d]/))return;mClose();show_loader();var container=get('posts_container');var new_post=document.createElement('span');new_post.setAttribute('id','post-'+pid);var url=url+"?id="+pid;$.ajax({type:"GET",url:url,beforeSend:function(xhr){xhr.setRequestHeader("sent_by","main.js");},success:function(msg){var post=msg;new_post.innerHTML=post;container.appendChild(new_post);window.frames[frameid].document.body.innerHTML="";if(firstcomm==1)
get('no_comments').style.display="none";show_loader('hide');}});}
function delete_post(id,url,sure)
{if(sure!=1)
{var body="<table border=\"0\" cellspacing=\"0\" cellpadding=\"4\" class=\"tableinborder\"><tr><td class=tabletitle><img src=\"pic/warn_q.png\" border=\"0\" height=19 title=\"Warning!\"/></td><td class=tabletitle style=\"text-align:left;\"><b>SceneFZ.net</b> - Warning!</td><td class=\"tabletitle\" align=\"right\"><a href=\"javascript:;\" onclick=\"mClose();\"><img src=\"pic/close.png\" border=\"0\"/></a></td></tr><tr><td class=\"tablea\" colspan=\"3\"><center>Are you sure you want to delete this post?</center></td></tr><tr><td class=\"tablea\" colspan=\"3\" style=\"text-align:center;\"><input type=\"button\" value=\"No\" onclick=\"mClose();\" />&nbsp;<input type=\"submit\" value=\"Yes\" onclick=\"delete_post('"+id+"', '"+url+"','1')\" /></td></tr></table>";coolTip(body,CENTERPOPUP,STICKY,EXCLUSIVE,DRAGGABLE,ALTCUT);return;}
show_loader();var container=get('posts_container');var new_post=get('post-'+id);$.ajax({type:"GET",url:url+id+"&sure=1",beforeSend:function(xhr){xhr.setRequestHeader("sent_by","main.js");},success:function(msg){var new_post=get('post-'+id);new_post.innerHTML="";show_loader('hide');}});}
function edit_post(url)
{var frameid="edit_res";var id=window.frames[frameid].document.body.innerHTML;if(id&&id.match(/[a-z]/))
{mClose();error(id);return;}
if(!id||!id.match(/[\d]/))return;mClose();show_loader();var post_body=get('postbody_'+id);$.ajax({type:"GET",url:url+"?html=1&id="+id,beforeSend:function(xhr){xhr.setRequestHeader("sent_by","main.js");},success:function(new_body){var currentTime=new Date();var fulldate=currentTime.getFullYear()+"-"+(currentTime.getMonth()+1)+"-"+currentTime.getDate()+" "+currentTime.getHours()+":"+currentTime.getMinutes()+":"+currentTime.getSeconds()+" GMT+2";new_body+="<br><div class='post-edit-reason'>Last edited by <a href='user-"+username+"-"+uid+".html'><b>"+username+"</b></a> at "+fulldate+"</div>";post_body.innerHTML=new_body;show_loader('hide');}});}
function show_pages(tid,tpages,divid){if(!tid||!tpages){error('Invalid id!<br>Please try refreshing the page!');return;}
mClose();var link="";var i=1;while(i<=tpages)
{link+="<a href=\"forums.php?action=viewtopic&topicid="+tid+"&page="+i+"\"> "+i+"</a>";i++;}
get(divid+"_"+tid).innerHTML=link;}
function check_result(frameid,msg)
{var result=window.frames[frameid].document.body.innerHTML;if(result!="1"&&result.match(/[a-z]/)!="null"&&window.frames[frameid].location!="about:blank"){error('Error:<br>'+result);window.frames[frameid].document.body.innerHTML="";}else if(result==1){coolTip('<b><font color=\'red\'>'+msg+'</font></b><br>',TIMEOUT,1000,CENTERPOPUP,MULTI,PUID,'result_'+frameid);nd();}
window.frames[frameid].document.body.innerHTML="";}
function check_complexity(pwd,ratediv)
{var pwd=get(pwd);var pwdval=pwd.value;var complexity=parseFloat(0);if(pwdval.match(/[a-zA-Z0-9]{4,}/))
complexity++;if(pwdval.match(/\S{10,}/))
complexity++;if(complexity=="0")
var text="<img src='pic/low.png' title='Too Short'>";else if(complexity=="1")
var text="<img src='pic/fair.png' title='Fair'>";else if(complexity=="2")
var text="<img src='pic/strong.png' title='Strong'>";else
var text="<img src='pic/low.png' title='Too Short'>";ratediv=get(ratediv);ratediv.innerHTML=text;}
function error(msg,close,title,drag){if(close=="1")
mClose();if(!title)
var title="Error";if(!msg)
return;var body="<table border=\"0\" cellspacing=\"0\" cellpadding=\"4\" class=\"tableinborder\"><tr><td class=tabletitle><img src=\"pic/error.png\" border=\"0\" title=\""+title+"\"/></td><td class=tabletitle  onmousedown=\"drag(1);\" onmouseup=\"drag(0);\"><b> SceneFZ.net - "+title+"</b></td><td class=\"tabletitle\" align=\"right\"><a href=\"javascript:;\" onclick=\"mClose();\"><img src=\"pic/close.png\" border=\"0\"/></a></td></tr><tr><td class=\"tablea\" colspan=\"3\"><center>"+msg+"</center></td></tr><tr><td class=\"tablea\" colspan=\"3\" style=\"text-align:center;\"><input type=\"button\" value=\"Close\" onclick=\"mClose();\" /></td></tr></table>";if(drag=="1"||!drag)
coolTip(body,CENTERPOPUP,STICKY,EXCLUSIVE,DRAGGABLE);else
coolTip(body,CENTERPOPUP,STICKY,EXCLUSIVE,DRAGGABLE);}
function show_loader(msg){if(!msg)
msg=loading_msg;if(msg=="hide"){mClose();return;}
coolTip(msg,CENTERPOPUP,STICKY,FULLHTML);}
function show_footer(queries,secs)
{if(queries>1)
qtxt="Queries";else
qtxt="Query";if(queries==0)
queries="<b>No</b>";var mitxt="Main site version:&nbsp;<b>"+main_site_ver+"</b><br>";mitxt+="JavaScript Core:&nbsp;<b>"+main_js_ver+"</b><br>";mitxt+="CoolTip Core:&nbsp;<b>1.71</b><br>";mitxt+="Generated with:&nbsp;<b>"+queries+"&nbsp;"+qtxt+"</b><br>";mitxt+="Generated in:&nbsp;<b>"+secs+"&nbsp;Seconds</b><br>";mitxt="<a href=\"#\" onmouseover=\"cooltip('"+mitxt+"',FOLLOWMOUSE,CAPTION,'Extended Info:');\" onmouseout=\"nd();\">";var text="<center><font class=smallfont>Powered by SceneFZ V"+main_site_ver+"-JSc "+main_js_ver+"&nbsp;[<b>"+queries+"</b>&nbsp;"+qtxt+" - "+secs+" seconds.]</center></font>";mitxt=mitxt+text+"</a>";get('footer_txt').innerHTML=mitxt;}
function confirm_del(url,msg)
{if(!url||!msg)
{error('Url/Message does not exist!');return false;}
var body="<table border=\"0\" cellspacing=\"0\" cellpadding=\"4\" class=\"tableinborder\"><tr><td class=tabletitle><img src=\"pic/warn_q.png\" border=\"0\" height=19 title=\"Warning!\"/></td><td class=tabletitle style=\"text-align:left;\"><b>SceneFZ.net</b> - Warning!</td><td class=\"tabletitle\" align=\"right\"><a href=\"javascript:;\" onclick=\"mClose();\"><img src=\"pic/close.png\" border=\"0\"/></a></td></tr><tr><td class=\"tablea\" colspan=\"3\"><center>"+msg+"</center></td></tr><tr><td class=\"tablea\" colspan=\"3\" style=\"text-align:center;\"><input type=\"button\" value=\"No\" onclick=\"mClose();\" />&nbsp;<input type=\"button\" value=\"Yes\" onclick=\"nd();document.location='"+url+"'\" /></form></td></tr></table>";coolTip(body,CENTERPOPUP,STICKY,EXCLUSIVE,DRAGGABLE,ALTCUT);}
function gen_quick_add(tid,title)
{if(!tid||!title)
{error('Invalid id/title!');return;}
var quick_add="<table cellpadding=\"4\" cellspacing=\"0\" border=\"0\" style=\"width:300px\" class=\"tableinborder\" align=\"center\"><tr><td class=\"tabletitle\"  width=\"100%\" colspan=2 onmousedown=\"drag(1);\" onmouseup=\"drag(0);\"><font class=normalfont><b>SceneFZ - </b>"+unescape(title)+"</font></td><td class=\"tabletitle\" colspan=2><a href=\"javascript:mClose();\"><img src=\"pic/close.png\" width=\"16\" height=\"14\" border=\"0\" title=\"Close\" alt=\"Close\" align=\"right\"></a></td></tr><tr><td align=\"center\" width=\"100%\" class=\"inposttable\" colspan=\"3\"><form method=post action=\"comment.php?action=add\" target=\"post_res\"><p><input type=\"hidden\" name=\"tid\" value=\""+tid+"\"/><div id=preview_text></div><div id=body_text><textarea name=text id=body rows=15 cols=80></textarea></div></p><p align=\"center\"><input type='submit' class='btn' value='Submit'/><span id=\"preview_button\">&nbsp;<input align=center type=button class=btn value='Preview' onclick=\"preview('text','1','435','213');\"></span></p></form></td><td align=right class=embedded style=\"background-color: white;\">"+smilie_board()+"</td></tr></table>";return quick_add;}
function show_netfriends(){show_loader();$.ajax({type:"GET",url:"ajax_netfriends.php",beforeSend:function(xhr){xhr.setRequestHeader("sent_by","main.js");},success:function(msg){error(msg,0,'Network neighbours',1);}});}
function gen_quick_quote(tid,cid,user){var url="ajax_getcommbody.php?id="+cid;show_loader();$.ajax({type:"GET",url:url,beforeSend:function(xhr){xhr.setRequestHeader("sent_by","main.js");},success:function(msg){if(!msg){error("Error","Invalid comment id!");return;}
var text="[quote="+user+"]\n"+msg+"\n[/quote]";var quick_q="<table cellpadding=\"4\" cellspacing=\"0\" border=\"0\" style=\"width:300px\" class=\"tableinborder\" align=\"center\"><tr><td class=\"tabletitle\"  width=\"100%\" colspan=2 onmousedown=\"drag(1);\" onmouseup=\"drag(0);\"><font class=normalfont><b>SceneFZ - </b>Quote: #"+cid+"</font></td><td class=\"tabletitle\" colspan=2><a href=\"javascript:mClose();\"><img src=\"pic/close.png\" width=\"16\" height=\"14\" border=\"0\" title=\"Close\" alt=\"Close\" align=\"right\"></a></td></tr><tr><td align=\"center\" width=\"100%\" class=\"inposttable\" colspan=\"3\"><form method=post action=\"comment.php?action=add\" target=\"post_res\"><p><input type=\"hidden\" name=\"tid\" value=\""+tid+"\"/><div id=preview_text></div><div id=body_text><textarea name=text id=body rows=15 cols=80>"+text+"</textarea></div></p><p align=\"center\"><input type='submit' class='btn' value='Submit'/><span id=\"preview_button\">&nbsp;<input align=center type=button class=btn value='Preview' onclick=\"preview('text','1','435','213');\"></span></p></form></td><td align=right class=embedded style=\"background-color: white;\">"+smilie_board()+"</td></tr></table>";show_loader('hide');return coolTip(quick_q,STICKY,CLOSECLICK,CENTERPOPUP,DRAGGABLE,EXCLUSIVE);}});}
function em(start,end)
{var start=" "+start+" ";if(end)
end=" "+end+" ";var ob=get('body');if(!ob){error('<b>Invalid object, please refresh the page!</b>','1');return;}
if(ob.isTextEdit){ob.focus();var sel=document.selection;var rng=sel.createRange();rng.colapse;if((sel.type=="Text"||sel.type=="None")&&rng!=null){if(end&&rng.text.length>0){start+=rng.text+end;rng.text=start;}
else
rng.text=rng.text+start;}
else
rng.text+=text;}
else
ob.value+=start;}
function smilie_board()
{var row="<table cellSpacing=\"1\" cellpadding=\"3\"><tr><td class=embedded style='padding: 2px; margin: 1px'><a href=\"javascript: em(':-)')\"><img border=0 src=pic/smilies/smile1.gif width=\"18\" height=\"18\"></a></td><td class=embedded style='padding: 2px; margin: 1px'><a href=\"javascript: em(':smile:')\"><img border=0 src=pic/smilies/smile2.gif width=\"18\" height=\"18\"></a></td><td class=embedded style='padding: 2px; margin: 1px'><a href=\"javascript: em(':-D')\"><img border=0 src=pic/smilies/grin.gif width=\"18\" height=\"18\"></a></td><td class=embedded style='padding: 2px; margin: 1px'><a href=\"javascript: em(':w00t:')\"><img border=0 src=pic/smilies/w00t.gif width=\"18\" height=\"20\"></a></td></tr><tr><td class=embedded style='padding: 2px; margin: 1px'><a href=\"javascript: em(':-P')\"><img border=0 src=pic/smilies/tongue.gif width=\"20\" height=\"20\"></a></td><td class=embedded style='padding: 2px; margin: 1px'><a href=\"javascript: em(';-)')\"><img border=0 src=pic/smilies/wink.gif width=\"20\" height=\"20\"></a></td><td class=embedded style='padding: 2px; margin: 1px'><a href=\"javascript: em(':-|')\"><img border=0 src=pic/smilies/noexpression.gif width=\"18\" height=\"18\"></a></td><td class=embedded style='padding: 2px; margin: 1px'><a href=\"javascript: em(':-/')\"><img border=0 src=pic/smilies/confused.gif width=\"18\" height=\"18\"></a></td></tr><tr><td class=embedded style='padding: 2px; margin: 1px'><a href=\"javascript: em(':-(')\"><img border=0 src=pic/smilies/sad.gif width=\"18\" height=\"18\"></a></td><td class=embedded style='padding: 2px; margin: 1px'><a href=\"javascript: em(':\\'-(')\"><img border=0 src=pic/smilies/cry.gif width=\"20\" height=\"20\"></a></td><td class=embedded style='padding: 2px; margin: 1px'><a href=\"javascript: em(':-O')\"><img border=0 src=pic/smilies/ohmy.gif width=\"18\" height=\"18\"></a></td><td class=embedded style='padding: 2px; margin: 1px'><a href=\"javascript: em('|-)')\"><img border=0 src=pic/smilies/sleeping.gif width=\"20\" height=\"27\"></a></td></tr><tr><td class=embedded style='padding: 2px; margin: 1px'><a href=\"javascript: em(':innocent:')\"><img border=0 src=pic/smilies/innocent.gif width=\"18\" height=\"22\"></a></td><td class=embedded style='padding: 2px; margin: 1px'><a href=\"javascript: em(':unsure:')\"><img border=0 src=pic/smilies/unsure.gif width=\"20\" height=\"20\"></a></td><td class=embedded style='padding: 2px; margin: 1px'><a href=\"javascript: em(':closedeyes:')\"><img border=0 src=pic/smilies/closedeyes.gif width=\"20\" height=\"20\"></a></td><td class=embedded style='padding: 2px; margin: 1px'><a href=\"javascript: em(':cool:')\"><img border=0 src=pic/smilies/cool2.gif width=\"20\" height=\"20\"></a></td></tr><tr><td class=embedded style='padding: 2px; margin: 1px'><a href=\"javascript: em(':thumbsdown:')\"><img border=0 src=pic/smilies/thumbsdown.gif width=\"27\" height=\"18\"></a></td><td class=embedded style='padding: 2px; margin: 1px'><a href=\"javascript: em(':blush:')\"><img border=0 src=pic/smilies/blush.gif width=\"20\" height=\"20\"></a></td><td class=embedded style='padding: 2px; margin: 1px'><a href=\"javascript: em(':yes:')\"><img border=0 src=pic/smilies/yes.gif width=\"20\" height=\"20\"></a></td><td class=embedded style='padding: 2px; margin: 1px'><a href=\"javascript: em(':no:')\"><img border=0 src=pic/smilies/no.gif width=\"20\" height=\"20\"></a></td></tr><tr><td class=embedded style='padding: 2px; margin: 1px'><a href=\"javascript: em(':love:')\"><img border=0 src=pic/smilies/love.gif width=\"19\" height=\"19\"></a></td><td class=embedded style='padding: 2px; margin: 1px'><a href=\"javascript: em(':?:')\"><img border=0 src=pic/smilies/question.gif width=\"19\" height=\"19\"></a></td><td class=embedded style='padding: 2px; margin: 1px'><a href=\"javascript: em(':!:')\"><img border=0 src=pic/smilies/excl.gif width=\"20\" height=\"20\"></a></td><td class=embedded style='padding: 2px; margin: 1px'><a href=\"javascript: em(':idea:')\"><img border=0 src=pic/smilies/idea.gif width=\"19\" height=\"19\"></a></td></tr><tr><td class=embedded style='padding: 2px; margin: 1px'><a href=\"javascript: em(':arrow:')\"><img border=0 src=pic/smilies/arrow.gif width=\"20\" height=\"20\"></a></td><td class=embedded style='padding: 2px; margin: 1px'><a href=\"javascript: em(':arrow2:')\"><img border=0 src=pic/smilies/arrow2.gif width=\"20\" height=\"20\"></a></td><td class=embedded style='padding: 2px; margin: 1px'><a href=\"javascript: em(':hmm:')\"><img border=0 src=pic/smilies/hmm.gif width=\"20\" height=\"20\"></a></td><td class=embedded style='padding: 2px; margin: 1px'><a href=\"javascript: em(':hmmm:')\"><img border=0 src=pic/smilies/hmmm.gif width=\"25\" height=\"23\"></a></td></tr><tr><td class=embedded style='padding: 2px; margin: 1px'><a href=\"javascript: em(':huh:')\"><img border=0 src=pic/smilies/huh.gif width=\"20\" height=\"20\"></a></td><td class=embedded style='padding: 2px; margin: 1px'><a href=\"javascript: em(':rolleyes:')\"><img border=0 src=pic/smilies/rolleyes.gif width=\"20\" height=\"20\"></a></td><td class=embedded style='padding: 2px; margin: 1px'><a href=\"javascript: em(':kiss:')\"><img border=0 src=pic/smilies/kiss.gif width=\"18\" height=\"18\"></a></td><td class=embedded style='padding: 2px; margin: 1px'><a href=\"javascript: em(':shifty:')\"><img border=0 src=pic/smilies/shifty.gif width=\"20\" height=\"20\"></a></td></tr><tr><td class=embedded style='padding: 2px; margin: 1px'><a href=\"javascript: em('[b]','[/b]')\"><img border=0 src=pic/bold.png width=\"20\" height=\"20\"></a></td><td class=embedded style='padding: 2px; margin: 1px'><a href=\"javascript: em('[i]','[/i]')\"><img border=0 src=pic/italic.png width=\"20\" height=\"20\"></a></td><td class=embedded style='padding: 2px; margin: 1px'><a href=\"javascript: em('[u]','[/u]')\"><img border=0 src=pic/underline.png width=\"20\" height=\"20\"></a></td><td class=embedded style='padding: 2px; margin: 1px'><a href=\"javascript: em('[center]','[/center]')\"><img border=0 src=pic/center.png width=\"20\" height=\"20\"></a></td></tr><tr><td class=embedded colspan=4><a href='smilies.php' target='_new'>More&nbsp;Smilies</a></td></tr></table>";return row;}
function gen_reply(tid,pid,quote)
{if(pid){var url="ajax_getbodypost.php?id="+pid;$.ajax({type:"GET",url:url,beforeSend:function(xhr){xhr.setRequestHeader("sent_by","main.js");},success:function(value){if(!value){error('<b>Something went wrong, this topic has no body text!</b>');value="";}
if(pid&&!quote)
{action="forums.php?action=editpost&ajax=1&postid="+pid;input="<input type=hidden name=returnto value=forums.php?action=viewtopic&topicid="+tid+"&page=last#"+pid+">";var editereason="<tr><td colspan=2 class=inposttable style=\"text-align:left;\">Reason:&nbsp;<input type=text name=editereason size=40></td></tr>";var reply_body="<table cellpadding=\"4\" cellspacing=\"0\" border=\"0\" style=\"width:100%\" class=\"tableinborder\"><tr><td class=\"tabletitle\" width=\"80%\" style=\"text-align: center\" id=\"drag_title\" onmousedown=\"drag(1);\" onmouseup=\"drag(0);\"><b>Post Edit</b></td><td class=tabletitle width=\"20%\"><div align=right><a href=\"javascript:mClose();\"><img src=\"pic/close.png\" width=\"16\" height=\"14\" border=\"0\" title=\"Close\" alt=\"Close\"></a></div></td></tr><tr><td width=\"100%\" class=\"inposttable\" style=\"text-align: center\" colspan=2><form method=post action="+action+" target=edit_res>"+input+"<table class=\"tableinborder\"  border=\"0\" cellspacing=\"1\" cellpadding=\"4\"><tr><td align=left style='padding: 0px' class=inposttable><div id=preview_text></div><div id=body_text><textarea name=body id=body class=text cols=100 rows=20 style='border: 0px'>"+value+"</textarea></div></td><td class=embedded style=\"background-color: white;\">"+smilie_board()+"</td></tr>"+editereason+"<tr><td colspan=2 class=inposttable style=\"text-align:center\"><input align=center type=submit class=btn value='Submit'><span id=\"preview_button\">&nbsp;<input align=center type=button class=btn value='Preview' onclick=\"preview('body','1');\"></span></td></tr></table></tr></table>";return coolTip(reply_body,VAUTO,STICKY,CLOSECLICK,CENTERPOPUP,DRAGGABLE,EXCLUSIVE);}else if(pid&&quote){action="forums.php?action=post";input="<input type=hidden name=topicid value="+tid+">";value="\n\n[quote="+quote+"]"+value+"[/quote]";var reply_body="<table cellpadding=\"4\" cellspacing=\"0\" border=\"0\" style=\"width:100%\" class=\"tableinborder\"><tr><td class=\"tabletitle\" width=\"80%\" style=\"text-align: center\"  id=\"drag_title\"  onmousedown=\"drag(1);\" onmouseup=\"drag(0);\"><b>Quote: "+quote+"</b></td><td class=tabletitle width=\"20%\"><div align=right><a href=\"javascript:mClose();\"><img src=\"pic/close.png\" width=\"16\" height=\"14\" border=\"0\" title=\"Close\" alt=\"Close\"></a></div></td></tr><tr><td width=\"100%\" class=\"inposttable\" style=\"text-align: center\" colspan=2><form method=post action="+action+" target=post_res>"+input+"<table class=\"tableinborder\"  border=\"0\" cellspacing=\"1\" cellpadding=\"4\"><tr><td align=left style='padding: 0px' class=inposttable><div id=preview_text></div><div id=body_text><textarea name=body id=body class=text cols=100 rows=20 style='border: 0px'>"+value+"</textarea></div></td><td class=embedded style=\"background-color: white;\">"+smilie_board()+"</td></tr><tr><td colspan=2 class=inposttable style=\"text-align:center\"><input align=center type=submit class=btn value='Submit'><span id=\"preview_button\">&nbsp;<input align=center type=button class=btn value='Preview' onclick=\"preview('body','1');\"></span></td></tr></table></tr></table>";return coolTip(reply_body,VAUTO,STICKY,CLOSECLICK,CENTERPOPUP,DRAGGABLE,EXCLUSIVE);}}});}
if(!pid&&!quote){action="forums.php?action=post&ajax=1";input="<input type=hidden name=topicid value="+tid+">";value="";var reply_body="<table cellpadding=\"4\" cellspacing=\"0\" border=\"0\" width=\"100%\" class=\"tableinborder\"><tr><td class=\"tabletitle\" width=\"80%\" style=\"text-align: center\"  id=\"drag_title\"  onmousedown=\"drag(1);\" onmouseup=\"drag(0);\"><b>New Post</b></td><td class=tabletitle width=\"20%\"><div align=right><a href=\"javascript:mClose();\"><img src=\"pic/close.png\" width=\"16\" height=\"14\" border=\"0\" title=\"Close\" alt=\"Close\"></a></div></td></tr><tr><td width=\"100%\" class=\"inposttable\" style=\"text-align: center\" colspan=2><form method=post action="+action+" target=\"post_res\">"+input+"<table class=\"tableinborder\"  border=\"0\" cellspacing=\"1\" cellpadding=\"4\"><tr><td align=left style='padding: 0px' class=inposttable ><div id=preview_text></div><div id=body_text><textarea name=body id=body class=text cols=100 rows=20 style='border: 0px'>"+value+"</textarea></div></td><td class=embedded style=\"background-color: white;\" height=20>"+smilie_board()+"</td></tr><tr><td colspan=3 class=inposttable style=\"text-align:center\"><input align=center type=submit class=btn value='Submit'><span id=\"preview_button\">&nbsp;<input align=center type=button class=btn value='Preview' onclick=\"preview('body','1');\"></span></td></tr></table></tr></table>";return reply_body;}}
function preview(textdiv,show,width,height){if(!width)
width=534;if(!height)
height=280;var text=get('body').value;if(!text){error('<b>Text cannot be empty!</b>','1');return;}
if(show=="1")
{get('body_text').style.display='none';$.ajax({type:"GET",url:"preview.php?width="+width+"&height="+height+"&text="+escape(text),beforeSend:function(xhr){xhr.setRequestHeader("sent_by","main.js");},success:function(value){if(!value){error('AJAX System Error:<br>Error while requesting data! No response...');return;}
get('preview_text').innerHTML=value;}});get('preview_button').innerHTML="&nbsp;<input align=right type=button class=btn value='Go Back' onclick=\"preview('"+textdiv+"','0','"+width+"','"+height+"');\">";}
else
{get('body_text').style.display='';get('preview_text').innerHTML="";get('preview_button').innerHTML="&nbsp;<input align=right type=button class=btn value='Preview' onclick=\"preview('"+textdiv+"','1','"+width+"','"+height+"');\">";}}
preload('pic/close.png');function show_msg(title,content)
{if(!content)return;if(!title)var title="Info";var puid='puid_'+Math.floor(Math.random()*20+1);var table="<table cellpadding=\"4\" cellspacing=\"0\" border=\"0\" style=\"width:300px\" class=\"tableinborder\" align=\"center\"><tr><td class=\"tabletitle\"  width=\"100%\" colspan=2  onmousedown=\"drag(1);\" onmouseup=\"drag(0);\"><b><font class=normalfont>SceneFZ - </b> "+title+"</font></td><td class=\"tabletitle\"><a href=\"javascript:;\" onclick=\"nd('"+puid+"');return nd('"+puid+"');\"><img src=\"pic/close.png\" width=\"16\" height=\"14\" border=\"0\" title=\"Close\" alt=\"Close\" align=\"right\"></a></td></tr><tr><td align=\"center\" width=\"100%\" class=\"inposttable\" colspan=\"3\"><div class=quote style=\"text-align:left;\">"+content+"</div><br><input type=button value=Close onclick=\"nd('"+puid+"');return nd('"+puid+"');\"></td></tr></table>";coolTip(table,VAUTO,STICKY,CLOSECLICK,CENTERPOPUP,DRAGGABLE,PUID,puid);}
function whois(ip){show_loader();if(!ip){ip="Enter ip!";var table="<table cellpadding=\"4\" cellspacing=\"0\" border=\"0\" style=\"width:300px\" class=\"tableinborder\" align=\"center\"><tr><td class=\"tabletitle\"  width=\"100%\" colspan=2 id=\"drag_title\" onmousedown=\"drag(1);\" onmouseup=\"drag(0);\"><b><font class=normalfont>SceneFZ - </b> Whois results for: <b>"+ip+"</b></font></td><td class=\"tabletitle\"><a href=\"javascript:mClose();\"><img src=\"pic/close.png\" width=\"16\" height=\"14\" border=\"0\" title=\"Close\" alt=\"Close\" align=\"right\"></a></td></tr><tr><td align=\"center\" width=\"100%\" class=\"inposttable\" colspan=\"3\"><div class=quote style=\"text-align:left;\">Enter ip to search!</div><br><div align=left>Search ip:<input type=text maxlength=15 name=ip id=ips>&nbsp;<input type=button value=Search onclick=\"mClose();whois(get('ips').value);\"></div><br><input type=button value=Close onclick=\"mClose();\"></td></tr></table>";coolTip(table,VAUTO,STICKY,CLOSECLICK,CENTERPOPUP,DRAGGABLE, ALTCUT);return;}
$.ajax({type:"GET",url:"ajax_whois.php?ip="+ip,beforeSend:function(xhr){xhr.setRequestHeader("sent_by","main.js");},success:function(value){var table="<table cellpadding=\"4\" cellspacing=\"0\" border=\"0\" style=\"width:300px\" class=\"tableinborder\" align=\"center\"><tr><td class=\"tabletitle\"  width=\"100%\" colspan=2 onmousedown=\"drag(1);\" onmouseup=\"drag(0);\"><b><font class=normalfont>SceneFZ - </b> Whois results for: <b>"+ip+"</b></font></td><td class=\"tabletitle\"><a href=\"javascript:mClose();\"><img src=\"pic/close.png\" width=\"16\" height=\"14\" border=\"0\" title=\"Close\" alt=\"Close\" align=\"right\"></a></td></tr><tr><td align=\"center\" width=\"100%\" class=\"inposttable\" colspan=\"3\"><div class=quote style=\"text-align:left;\">"+value+"</div><br><div align=left>Search ip:<input type=text maxlength=15 name=ip id=ips value='"+ip+"'>&nbsp;<input type=button value=Search onclick=\"mClose();whois(get('ips').value);\"></div><br><input type=button value=Close onclick=\"mClose();\"></td></tr></table>";return coolTip(table,VAUTO,STICKY,CLOSECLICK,CENTERPOPUP,DRAGGABLE);}});}
function gen_quick_edit(cid,tid,title)
{show_loader();$.ajax({type:"GET",url:"ajax_getcommbody.php?id="+cid,beforeSend:function(xhr){xhr.setRequestHeader("sent_by","main.js");},success:function(value){show_loader('hide');if(!value){error('AJAX System Error:<br>Error while requesting data! No response...');return;}
var quick_edit="<table cellpadding=\"4\" cellspacing=\"0\" border=\"0\" style=\"width:300px\" class=\"tableinborder\" align=\"center\"><tr><td class=\"tabletitle\"  width=\"100%\" colspan=2 onmousedown=\"drag(1);\" onmouseup=\"drag(0);\"><b><font class=normalfont>SceneFZ - </b>"+unescape(title)+" [Edit]</font></td><td class=\"tabletitle\"><a href=\"javascript:mClose();\"><img src=\"pic/close.png\" width=\"16\" height=\"14\" border=\"0\" title=\"Close\" alt=\"Close\" align=\"right\"></a></td></tr><tr><td align=\"center\" width=\"100%\" class=\"inposttable\" colspan=\"2\"><form method=\"post\" action=\"comment.php?action=edit&amp;cid="+cid+"\" target=\"edit_res\"><input type=\"hidden\" name=\"cid\" value=\""+cid+"\"/><input type=\"hidden\" name=\"returnto\" value=\"details.php?id="+tid+"\" /><div id=preview_text></div><div id=body_text><textarea name=\"text\" id=\"body\" rows=\"10\" cols=\"80\">"+value+"</textarea></div><p align='left'>Reason:&nbsp;<input type='text' name='editreason' size='80'></p><p align=\"center\"><input type=\"submit\" class=btn value=\"Add\"/><span id=\"preview_button\">&nbsp;<input align=center type=button class=btn value='Preview' onclick=\"preview('text','1','435','213');\"></span></p></form></td><td class=embedded style=\"background-color: white;\">"+smilie_board()+"</td></tr></table>";return coolTip(quick_edit,VAUTO,STICKY,CLOSECLICK,CENTERPOPUP,DRAGGABLE);}});}
function addLoadEvent(func){window.onload=function(){func;}}
function loadMsg(func){var oldonload=window.onload;if(typeof window.onload!='function'){window.onload=func;}else{window.onload=function(){if(oldonload){oldonload();}
func();}}}
function getcookie(cookiename){var cookiestring=""+document.cookie;var index1=cookiestring.indexOf(cookiename);if(index1==-1||cookiename=="")return"";var index2=cookiestring.indexOf(';',index1);if(index2==-1)index2=cookiestring.length;return unescape(cookiestring.substring(index1+cookiename.length+1,index2));}
function setcookie(name,value,duration)
{cookiestring=name+"="+escape(value)+";";document.cookie=cookiestring;if(!getcookie(name))
{return false;}
else
{return true;}}
function preload()
{var images=new Array;for(i=0;i<preload.arguments.length;i++)
{images[i]=new Image()
images[i].src=preload.arguments[i]}}
function toggle(typ)
{if(!typ){error('Invalid Object!<br>Please try refreshing the page!');return;}
var toggleSrc=get('torrents_'+typ);if(!toggleSrc){error('Invalid Object!<br>Please try refreshing the page!');return;}
var imgSrc=get('pic_'+typ);if(toggleSrc.style.display=='none'){toggleSrc.style.display='';imgSrc.src=imgSrc.src.replace(/plus/,"minus");setcookie('show_'+typ,'1');}
else{toggleSrc.style.display='none';imgSrc.src=imgSrc.src.replace(/minus/,"plus");setcookie('show_'+typ,'0');}}
function accepta_reguli()
{setcookie("disclaimer",'1');mClose();}
function HideMsg(id,total,pic)
{var msg=get(id);setcookie('show_'+id,'0_'+total);msg.style.display='none';if(pic=="1")
{var pic=get("pic_"+id);pic.src=="pic/plus.gif";}}
function CheckMsg(id,total)
{var msg=get(id);if(getcookie('show_'+id)=="0_"+total)
HideMsg(id,total)}
function new_img()
{thesrc=get("verimg").src;thesrc=thesrc.substring(0,thesrc.lastIndexOf(".")+4);get("verimg").src=thesrc+"?"+Math.round(Math.random()*100000);}
function close_win()
{if(!window.close())
document.location="about:blank";}
function change_disc_lang(lang){if(lang!="en"&&lang!="ro")
error('<b>Invalid language!</b>');if(lang=="en")
get('disc_content').innerHTML=disclaimer_text_en;else if(lang=="ro")
get('disc_content').innerHTML=disclaimer_text_ro;else if (lang=="fr")
get('disc_content').innerHTML=disclaimer_text_fr;else if (lang=="it")
get('disc_content').innerHTML=disclaimer_text_it;
}
function ajax_init(){if(window.XMLHttpRequest)
{xmlhttp=new XMLHttpRequest()}else if(window.ActiveXObject){xmlhttp=new ActiveXObject("Microsoft.XMLHTTP")}
else error('<b>Your browser does not support AJAX requests!<br>Please use a browser compatible with this feature!</b>');}
function check_ip(ip,id)
{show_loader();$.ajax({type:"GET",url:"ajax_ipcheck.php?ip="+ip,beforeSend:function(xhr){xhr.setRequestHeader("sent_by","main.js");},success:function(res){if(!res){error('AJAX Error:<br>No response!');return;}
if(res==0)
result="<b>Status: <font color=green>OK</font></b>";else if(res==1)
result="<b>Status: <font color=red>BANNED</font></b>";else
{error('AJAX System Error:<br>Bad date received!');return;}
get(id).innerHTML=result;show_loader('hide');}});}
function get_snatchers(id,full,divid,hide)
{if(!id)
{error('Invalid ID!');return;}
if(hide=="1"){get(divid).innerHTML="<a href=javascript:; onclick=\"get_snatchers(' "+id+"', '0', '"+divid+"')\">[Show]</a>";return;}
if(full!=1)
var full=0;if(full==1)
var show="<a href=javascript:; onclick=\"get_snatchers('"+id+"', '1', '"+divid+"','1')\">[Hide]</a>";else
var show="<a href=javascript:; onclick=\"get_snatchers('"+id+"', '1', '"+divid+"')\">[Show All]</a> <a href=javascript:; onclick=\"get_snatchers('"+id+"', '1', '"+divid+"','1')\">[Hide]</a>";show_loader();$.ajax({type:"GET",url:'ajax_snatchers.php?id='+id+'&all='+full,beforeSend:function(xhr){xhr.setRequestHeader("sent_by","main.js");},success:function(res){if(!res){error('AJAX System Error:<br>No data received!');return;}
get(divid).innerHTML=res+" "+show;show_loader('hide');}});}
function get_torrents(uid,tip,divid)
{if(get(divid).innerHTML.length>0)
return;do_update(divid,'ajax_utorrents.php?id='+uid+'&type='+tip);setTimeout("ts_makeSortable(get('"+tip+"_table'))",1000);}
function get_filelist(tid,divid,hide)
{if(hide=="1")
{get(divid+"_simple").style.display='';get(divid+"_complex").style.display='none';get('show_hide').innerHTML="<a href=javascript:; onclick=\"get_filelist('"+tid+"','"+divid+"','0')\">[Show]</a>";return;}
else if(hide=="0"&&get(divid+"_complex").innerHTML.length>0){get(divid+"_simple").style.display='none';get(divid+"_complex").style.display='';get('show_hide').innerHTML="<a href=javascript:; onclick=\"get_filelist('"+tid+"','"+divid+"','1')\">[Hide]</a>";return;}
get(divid+"_simple").style.display='none';do_update(divid+"_complex",'ajax_filelist.php?id='+tid);get('show_hide').innerHTML="<a href=javascript:; onclick=\"get_filelist('"+tid+"','"+divid+"','1')\">[Hide]</a>";}
function get_stats(divid)
{if(get(divid).innerHTML.length>20)return;do_update(divid,'ajax_userstats.php');if(get('js_enabled')&&get('time')){get('js_enabled').innerHTML="-";get('time').innerHTML="-";}}
function get_snatchlist(tid,divid,hide)
{if(hide=="1")
{get(divid).style.display="none";get(divid+"_link").innerHTML="<a href=\"javascript:;\" onclick=\"get_snatchlist(\'"+tid+"\', \'"+divid+"\', '0')\" class=\"sublink\">[Show]</a>";return;}
else if(get(divid).innerHTML.length>0)
{get(divid).style.display="";get(divid+"_link").innerHTML="<a href=\"javascript:;\" onclick=\"get_snatchlist(\'"+tid+"\', \'"+divid+"\', '1')\" class=\"sublink\">[Hide]</a>";return;}
do_update(divid,'ajax_snatchlist.php?id='+tid);get(divid+"_link").innerHTML="<a href=\"javascript:;\" onclick=\"get_snatchlist(\'"+tid+"\', \'"+divid+"\', '1')\" class=\"sublink\">[Hide]</a>";}
function get_peerlist(tid,tip,divid,hide)
{if(hide=="1")
{get(divid+"_full").style.display="none";get(divid+"_simple").style.display="";get(divid+"_link").innerHTML="<a href=javascript:; onclick=\"get_peerlist(\'"+tid+"\', \'"+tip+"\', \'"+divid+"\',\'0\')\">[Show All]</a>";return;}
else if(get(divid+"_full").innerHTML.length>"0")
{get(divid+"_full").style.display="";get(divid+"_simple").style.display="none";get(divid+"_link").innerHTML="<a href=javascript:; onclick=\"get_peerlist(\'"+tid+"\', \'"+tip+"\', \'"+divid+"\',\'1\')\">[Hide All]</a>";return;}
do_update(divid+"_full",'ajax_peerlist.php?id='+tid+'&type='+tip);get(divid+"_simple").style.display="none";get(divid+"_link").innerHTML="<a href=javascript:; onclick=\"get_peerlist(\'"+tid+"\', \'"+tip+"\', \'"+divid+"\',\'1\')\">[Hide All]</a>";setTimeout("ts_makeSortable(get('"+tip+"_table'))",1000);}
function do_update(divid,url)
{show_loader();$.ajax({type:"GET",url:url,beforeSend:function(xhr){xhr.setRequestHeader("sent_by","main.js");},success:function(res){if(res.length<1){error('AJAX System Error:<br>Invalid response (maybe a null result)','1');get(divid).innerHTML="0";return false;}
else
get(divid).innerHTML=res;show_loader('hide');return true;}});}
function do_bookmark(tid){show_loader();$.ajax({type:"GET",url:"bookmark.php?action=add&tid="+tid,beforeSend:function(xhr){xhr.setRequestHeader("sent_by","main.js");},success:function(res){if(res=="1")
{show_loader("hide");show_loader("<b>Successfuly Bookmarked!</b>");setTimeout("show_loader('hide')",1000);get('bookmark').innerHTML="<b>Torrent Bookmarked.</b>";}else{show_loader("hide");error(res);}}});}
function show_invites(id,status){if(status==1){get("invites_tr").style.display="";if(get("invites_full").innerHTML=="")
do_update('invites_full','ajax_invites.php?id='+id);get("invites_link").innerHTML="<a href='javascript:;' onclick=\"show_invites('"+id+"', '0')\">[Hide]</a>";}else if(status==0){get("invites_tr").style.display="none";get("invites_link").innerHTML="<a href='javascript:;' onclick=\"show_invites('"+id+"', '1')\">[Show]</a>";}}
function do_post(url,data,closeol)
{show_loader();ajax_init();xmlhttp.open("POST",url,true);xmlhttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8");xmlhttp.setRequestHeader("Content-length",data.length);xmlhttp.setRequestHeader("Connection","close");xmlhttp.setRequestHeader('sent_by','main.js');xmlhttp.send(data);show_loader('hide');if(closeol==1)
mClose();}
function hide_menus(lvl)
{var mainmenu=getcookie('show_mainmenu');var tmenu=getcookie('show_torrentsmenu');var accmenu=getcookie('show_acc');var adminmenu=getcookie('show_admin');var tdnr=getcookie('show_topdonors');if(lvl==0||lvl==1){if(mainmenu==0)toggle('mainmenu');if(tmenu==0)toggle('torrentsmenu');if(accmenu==0)toggle('acc');if(lvl==1){if(adminmenu==0)toggle('admin');}}}
function transform(id)
{if(id==1)
var value=document.editprof.download.value;else if(id==2)
var value=document.editprof.upload.value;else return;if(!value)value="0";var value=parseFloat(value);var newvalue=prompt("Add some GB!","");if(!newvalue)newvalue="0";var newvalue=newvalue*1073741824;var total=value+newvalue;if(id==1)
document.editprof.download.value=total;else
document.editprof.upload.value=total;}
function show_scat(id)
{if(get('sc_'+id).style.display=='none')
get('sc_'+id).style.display='';else
get('sc_'+id).style.display='none';}
function display_msg(id){if(!id)error('Invalid id');show_loader();$.ajax({type:"GET",url:"ajax_readmsg.php?id="+id,beforeSend:function(xhr){xhr.setRequestHeader("sent_by","main.js");},success:function(res){if(res.length<1){error('AJAX System Error:<br>Invalid response (maybe a null result)','1');return;}else{show_loader('hide');coolTip(res,PUID,'msg_read_'+id,RIGHT,DRAGGABLE,STICKY);}}});}
function rand(n)
{return(Math.floor(Math.random()*n+1));}
function reply_msg(id,isnew,center){if(!id)error('Invalid id');show_loader();if(!isnew)
url="ajax_replymsg.php?id="+id;else
url="ajax_replymsg.php?receiver="+id;$.ajax({type:"GET",url:url,beforeSend:function(xhr){xhr.setRequestHeader("sent_by","main.js");},success:function(res){if(res.length<1){error('AJAX System Error:<br>Invalid response (maybe a null result)','1');get(divid).innerHTML="0";return;}
else{show_loader('hide');if(!center)
return coolTip(res,DRAGGABLE,STICKY,PUID,'msg_reply_'+id,LEFT);else
return coolTip(res,DRAGGABLE,STICKY,PUID,'msg_reply_'+id,CENTERPOPUP);}}});}
function move_msg(id,fid){if(!id)error('Invalid id');show_loader();$.ajax({type:"GET",url:"messages.php?folder="+fid+"&action=move&id="+id+"&head=no",beforeSend:function(xhr){xhr.setRequestHeader("sent_by","main.js");},success:function(res){show_loader('hide');return coolTip(res,DRAGGABLE,STICKY,PUID,'msg_move_'+id,LEFT);}});}
function show_op(){var op=get('msgop');if(op.style.display=='none')
op.style.display='';else
op.style.display='none';}
function show_ousers(){var span=get('online_users');var tr=get('online_users_tr');var img=get('online_pic');if(span.innerHTML.length<1){show_loader();$.ajax({type:"GET",url:"ajax_onlineusers.php",beforeSend:function(xhr){xhr.setRequestHeader("sent_by","main.js");},success:function(res){if(res.length<1){error('AJAX System Error:<br>Invalid response (maybe a null result)','1');return;}
span.innerHTML=res;show_loader('hide');}});}
if(tr.style.display=='none'){tr.style.display='';img.src='pic/minus.gif';}else{tr.style.display='none';img.src='pic/plus.gif';}}
NcodeImageResizer.IMAGE_ID_BASE='ncode_imageresizer_container_';NcodeImageResizer.WARNING_ID_BASE='ncode_imageresizer_warning_';NcodeImageResizer.MODE='enlarge';NcodeImageResizer.MAXWIDTH=0;NcodeImageResizer.MAXHEIGHT=200;NcodeImageResizer.Msg1='Click this bar to view the full image.';NcodeImageResizer.Msg2='This image has been resized. Click this bar to view the full image.';NcodeImageResizer.Msg3='This image has been resized. Click this bar to view the full image.';NcodeImageResizer.Msg4='Click this bar to view the small image.';NcodeImageResizer.IMAGE_ID_BASE='ncode_imageresizer_container_';NcodeImageResizer.WARNING_ID_BASE='ncode_imageresizer_warning_';function NcodeImageResizer(id,img){this.id=id;this.img=img;this.originalWidth=0;this.originalHeight=0;this.warning=null;this.warningTextNode=null;img.id=NcodeImageResizer.IMAGE_ID_BASE+id;}
NcodeImageResizer.getNextId=function(){id=1;while(document.getElementById(NcodeImageResizer.IMAGE_ID_BASE+id)!=null){id++;}
return id;}
NcodeImageResizer.createOn=function(img){isRecovery=false;if(img.id&&img.id.indexOf(NcodeImageResizer.IMAGE_ID_BASE)==0&&document.getElementById(NcodeImageResizer.WARNING_ID_BASE+img.id.substr(NcodeImageResizer.IMAGE_ID_BASE.length))!=null){newid=img.id.substr(NcodeImageResizer.IMAGE_ID_BASE.length);resizer=new NcodeImageResizer(newid,img);isRecovery=true;resizer.restoreImage();}else{newid=NcodeImageResizer.getNextId();resizer=new NcodeImageResizer(id,img);}
if(resizer.originalWidth==0)resizer.originalWidth=img.width;if(resizer.originalHeight==0)resizer.originalHeight=img.height;if((NcodeImageResizer.MAXWIDTH>0&&resizer.originalWidth>NcodeImageResizer.MAXWIDTH)||(NcodeImageResizer.MAXHEIGHT>0&&resizer.originalHeight>NcodeImageResizer.MAXHEIGHT)){if(isRecovery){resizer.reclaimWarning(warning);}else{resizer.createWarning();}
resizer.scale();}}
NcodeImageResizer.prototype.restoreImage=function(){newimg=document.createElement('IMG');newimg.src=this.img.src;this.img.width=newimg.width;this.img.height=newimg.height;}
NcodeImageResizer.prototype.reclaimWarning=function(){warning=document.getElementById(NcodeImageResizer.WARNING_ID_BASE+newid);this.warning=warning;this.warningTextNode=warning.firstChild.firstChild.childNodes[1].firstChild;this.warning.resize=this;this.scale();}
NcodeImageResizer.prototype.createWarning=function(){mtable=document.createElement('TABLE');mtbody=document.createElement('TBODY');mtr=document.createElement('TR');mtd1=document.createElement('TD');mtd2=document.createElement('TD');mimg=document.createElement('IMG');mtext=document.createTextNode('');mimg.src='pic/wol_error.gif';mimg.width=16;mimg.height=16;mimg.alt='';mimg.border=0;mtd1.width=20;mtd1.className='td1';mtd2.unselectable='on';mtd2.className='td2';mtable.className='ncode_imageresizer_warning';mtable.textNode=mtext;mtable.resize=this;mtable.id=NcodeImageResizer.WARNING_ID_BASE+this.id;mtd1.appendChild(mimg);mtd2.appendChild(mtext);mtr.appendChild(mtd1);mtr.appendChild(mtd2);mtbody.appendChild(mtr);mtable.appendChild(mtbody);this.img.parentNode.insertBefore(mtable,this.img);this.warning=mtable;this.warningTextNode=mtext;}
NcodeImageResizer.prototype.scale=function(){if(NcodeImageResizer.MAXWIDTH>0&&this.originalWidth>NcodeImageResizer.MAXWIDTH){resized=true;this.img.width=NcodeImageResizer.MAXWIDTH;this.img.height=(NcodeImageResizer.MAXWIDTH/this.originalWidth)*this.originalHeight;}
if(NcodeImageResizer.MAXHEIGHT>0&&this.originalHeight>NcodeImageResizer.MAXHEIGHT){resized=true;this.img.height=NcodeImageResizer.MAXHEIGHT;this.img.width=(NcodeImageResizer.MAXHEIGHT/this.originalHeight)*this.originalWidth;}
this.warning.width=this.img.width;this.warning.onclick=function(){return this.resize.unScale();}
if(this.img.width<450){this.warningTextNode.data=NcodeImageResizer.Msg1;}else if(this.img.fileSize&&this.img.fileSize>0){this.warningTextNode.data=NcodeImageResizer.Msg2.replace('%1$s',this.originalWidth).replace('%2$s',this.originalHeight).replace('%3$s',Math.round(this.img.fileSize/1024));}else{this.warningTextNode.data=NcodeImageResizer.Msg3.replace('%1$s',this.originalWidth).replace('%2$s',this.originalHeight);}
return false;}
NcodeImageResizer.prototype.unScale=function(){switch(NcodeImageResizer.MODE){case'none':break;case'samewindow':window.open(this.img.src,'_self');break;case'newwindow':window.open(this.img.src,'_blank');break;case'enlarge':default:this.img.id="rand"+Math.random()*5;enlargerFadeIn(this.img.id,0);this.img.width=this.originalWidth;this.img.height=this.originalHeight;this.img.className='ncode_imageresizer_original';if(this.warning!=null){this.warningTextNode.data=NcodeImageResizer.Msg4;this.warning.width=this.img.width;this.warning.onclick=function(){return this.resize.scale()};}
break;}
return false;}
function enlargerFadeIn(objId,opacity)
{if(document.getElementById)
{obj=document.getElementById(objId);if(opacity<=100)
{setOpacity(obj,opacity);opacity+=4;window.setTimeout("enlargerFadeIn('"+objId+"',"+opacity+")",20);}}}
function setOpacity(obj,opacity)
{opacity=(opacity==100)?99.999:opacity;obj.style.filter="alpha(opacity:"+opacity+")";obj.style.KHTMLOpacity=opacity/100;obj.style.MozOpacity=opacity/100;obj.style.opacity=opacity/100;}
var cLoaded=0,pmStart=10000000,pmUpper=10001000,pmCount=pmStart+1,pms=new Array(),pmt='',cInfo=new Info(1.71,0),FREPLACE=0,FBEFORE=1,FAFTER=2,FALTERNATE=3,FCHAIN=4,hookPts=new Array(),postParse=new Array(),cmdLine=new Array(),runTime=new Array(),parentLyrs=new Array(),coreCmds='donothing,inarray,caparray,sticky,background,noclose,caption,left,right,center,offsetx,offsety,'+'fgcolor,bgcolor,textcolor,capcolor,closecolor,width,border,cellpad,status,autostatus,'+'autostatuscap,height,closetext,snapx,snapy,fixx,fixy,relx,rely,fgbackground,bgbackground,'+'padx,pady,fullhtml,above,below,capicon,textfont,captionfont,closefont,textsize,'+'captionsize,closesize,timeout,function,delay,hauto,vauto,closeclick,wrap,followmouse,'+'mouseoff,closetitle,puid,keepctd,multi,cssoff,compatmode,capalign,textalign,cssclass,fgclass,bgclass,textfontclass,'+'captionfontclass,closefontclass';registerCommands(coreCmds);function ud(v){return eval('typeof cd_'+v+'=="undefined"');}
var cUdf='undefined',coreValues='donothing||inarray||caparray||sticky|0|background||noclose||caption||left||right|RIGHT|center||offsetx|10|offsety|10|'+'fgcolor|#CCCCFF|bgcolor|#333399|textcolor|#000000|capcolor|#FFFFFF|closecolor|#9999FF|width|200|border|1|cellpad|2|status||autostatus|0|'+'autostatuscap||height|-1|closetext|Close|snapx|0|snapy|0|fixx|-1|fixy|-1|relx|null|rely|null|fgbackground||bgbackground||padx|1|pady|1|'+'fullhtml|0|above||below|BELOW|capicon||textfont|Verdana,Arial,Helvetica|captionfont|Verdana,Arial,Helvetica|closefont|Verdana,Arial,Helvetica|'+'textsize|1|captionsize|1|closesize|1|timeout|0|function|null|delay|0|hauto|0|vauto|0|closeclick|0|wrap|0|followmouse|1|'+'mouseoff|0|closetitle|Click to Close|puid||keepctd|0|multi||cssoff|CSSOFF|compatmode|0|capalign||textalign||cssclass||fgclass||bgclass||textfontclass||'+'captionfontclass||closefontclass|';setDefaultVariables(coreValues);if(ud('aboveheight'))var cd_aboveheight=0;if(ud('frame'))var cd_frame=self;if(ud('text'))var cd_text="Default Text";if(ud('texts'))var cd_texts=new Array("Text 0","Text 1");if(ud('caps'))var cd_caps=new Array("Caption 0","Caption 1");var cFrame=self,cTip=null,po,cZindex,isMac=(navigator.userAgent.indexOf("Mac")!=-1),cOp=(navigator.userAgent.toLowerCase().indexOf('opera')>-1&&document.createTextNode),cNs4=(navigator.appName=='Netscape'&&parseInt(navigator.appVersion)==4),cNs6=(document.getElementById)?true:false,cKq=cNs6&&/konqueror/i.test(navigator.userAgent),cSaf=cNs6&&/safari/i.test(navigator.userAgent),cIe4=(document.all)?true:false,cIe5=false,cIe55=false,cMx=0,cMy=0,docRoot='document.body';if(cNs4){var oW=window.innerWidth;var oH=window.innerHeight;window.onresize=function(){if(oW!=window.innerWidth||oH!=window.innerHeight)location.reload();}}
if(cIe4){var agent=navigator.userAgent;if(/MSIE/.test(agent)){var versNum=parseFloat(agent.match(/MSIE[ ](\d\.\d+)\.*/)[1]);if(versNum>=5){cIe5=true;cIe55=(versNum>=5.5&&!cOp)?true:false;if(cNs6)cNs6=false;}}
if(cNs6)cIe4=false;}
if(document.compatMode&&document.compatMode=='CSS1Compat')docRoot=((cIe4&&!cOp)?'document.documentElement':docRoot);if(window.addEventListener)window.addEventListener("load",ctLoadHandler,false);else if(window.attachEvent)window.attachEvent("onload",ctLoadHandler);var capExtent;function cooltip(){return coolTip(arguments);}
function coolTip(){var theDiv,args=(typeof arguments[0]=='object')?arguments[0]:arguments;if(!cLoaded||isExclusive(args))return true;if(ctCheckMouseCapture)ctMouseCapture();if(cTip){cTip=(typeof cTip.id!='string')?null:cTip;if(cTip&&cTip.id=='ctDiv'&&!hasKeepCtD(args))cClick();}
cFrame=cd_frame;cTip=initLayerObject((theDiv=divID(args)),hasCommand(0,args,MULTI)!=-1);po=cTip.pop;setRunTimeVariables(po);parseTokens('x',args);if(typeof cParams!=cUdf&&typeof cParams[theDiv]!=cUdf&&cParams[theDiv].length)parseTokens('x',cParams[theDiv]);if(!postParseChecks('x',args))return false;if(po.delay==0){return runHook("ctMain",FREPLACE,cTip.id);}else{po.delayid=setTimeout("runHook('ctMain',FREPLACE,'"+cTip.id+"')",po.delay);return false;}}
function nd(id,time){if(cLoaded&&!isExclusive()){var lyr=cTip,po,ID='',args=arguments,num=args.length;switch(num){case 2:case 1:if(typeof args[0]=='number'){time=args[0];ID=(num==2)?args[1]:null;}else{ID=args[0];time=(num==2)?args[1]:null;}
break;default:ID='ctDiv';}
if(ID)lyr=fetchObjectLyr(ID);if(lyr){po=lyr.pop;hideDelay(time,lyr);if(po){if(po.showingsticky)runHook('setPosition',FCHAIN,po);if(po.removecounter>=1){po.showingsticky=0};if(po.showingsticky==0){po.allowmove=po.sticknow=0;if(lyr!=null&&po.timerid==0)runHook("hideObject",FREPLACE,lyr);}else po.removecounter++;}}}
return true;}
function cClick(id){if(cLoaded){var lyr=cTip,po;if(id)lyr=fetchObjectLyr(id);po=lyr.pop;runHook("hideObject",FREPLACE,lyr);if(po&&po.showingsticky)po.showingsticky=po.sticknow=0;}
return false;}
function ctPageDefaults(){var args=(typeof arguments[0]=='object'?arguments[0]:arguments),id=divID(args);if(id){var i,k=new Array()
if(typeof cParams==cUdf)cParams=new Array();for(i=0;i<args.length;i++){if(typeof args[i]=='number'&&args[i]==PUID){i++;continue;}
k[k.length++]=args[i];}
args=k
k=new Array()
if(typeof cParams[id]!=cUdf&&cParams[id].length){if(typeof args[0]=='string'){if(typeof cParams[id][0]=='string')cParams[id][0]=args[0];else{k[0]=args[0];k=k.concat(cParams[id]);cParams[id]=k;}
args=args.slice(1);}
cParams[id]=cParams[id].concat(args);}else cParams[id]=args;}else parseTokens('cd_',args);}
function ctMain(id){var layerhtml,styleType,cls;cTip=fetchObjectLyr(id);po=cTip.pop;runHook("ctMain",FBEFORE,id);with(po){if(background!=""||fullhtml){layerhtml=runHook('ctContentBackground',FALTERNATE,css,text,background,fullhtml);}else{if(fgbackground!="")fgbackground="background=\""+fgbackground+"\"";styleType=(pms[css-1-pmStart]=="cssoff"||pms[css-1-pmStart]=="cssclass");if(bgbackground!="")bgbackground=(styleType?"background=\""+bgbackground+"\"":bgbackground);if(fgcolor!="")fgcolor=(styleType?"bgcolor=\""+fgcolor+"\"":fgcolor);if(bgcolor!="")bgcolor=(styleType?"bgcolor=\""+bgcolor+"\"":bgcolor);if(height>0)height=(styleType?"height=\""+height+"\"":height);else height="";if(cap==""){layerhtml=runHook('ctContentSimple',FALTERNATE,css,text);}else{cls=(sticky)?close:'';layerhtml=runHook('ctContentCaption',FALTERNATE,css,text,cap,cls);}}
if(sticky){if(timerid>0){clearTimeout(timerid);timerid=0;}
showingsticky=1;removecounter=0;}
if(!runHook("ctCreatePopup",FREPLACE,layerhtml))return false;if(autostatus>0){status=text;if(autostatus>1)status=cap;if(wrap)status=status.replace(/&nbsp;/g,' ');}
allowmove=0;if(timeout>0){if(timerid>0)clearTimeout(timerid);timerid=setTimeout("cClick('"+cTip.id+"')",timeout);}
runHook("disp",FREPLACE,status);runHook("ctMain",FAFTER,id);return(cOp&&event&&event.type=='mouseover'&&!status)?'':(status!='');}}
function ctContentSimple(text){var txt;with(po){txt='<table width="'+width+'" border="0" cellpadding="'+border+'" cellspacing="0" '+(bgclass?'class="'+bgclass+'"':bgcolor+' '+height)+'><tr><td>'+ctInnerTable(text)+'</td></tr></table>';}
set_background("");return txt;}
function ctContentCaption(text,title,close){var txt,nameId,doClose=(close!="");var closing="";var closeevent="onmouseover";with(po){if(closeclick==1)closeevent=(closetitle?"title='"+closetitle+"'":"")+" onclick";if(capicon!=""){nameId=' hspace="5"'+' align="middle" alt=""';if(typeof dragimg!=cUdf&&dragimg)nameId=' name="'+dragimg+'" id="'+dragimg+'" hspace="5" align="middle" alt="Drag Enabled" title="Drag Enabled"';capicon='<img src="'+capicon+'"'+nameId+' />';}
if(doClose)
closing='<td '+(!compatmode&&closefontclass?'class="'+closefontclass:'align="right')+'"><a href="javascript:return '+fnRef+'cClick(\''+cTip.id+'\');" '+((compatmode&&closefontclass)?' class="'+closefontclass+'" ':' ')+closeevent+'="return '+fnRef+'cClick(\''+cTip.id+'\');">'+(closefontclass?'':wrapStr(0,closesize,'close'))+close+(closefontclass?'':wrapStr(1,closesize,'close'))+'</a></td>';txt='<table width="'+width+'" border="0" cellpadding="'+border+'" cellspacing="0" '+(bgclass?'class="'+bgclass+'"':bgcolor+' '+bgbackground+' '+height)+'><tr><td><table width="100%" border="0" cellpadding="1" cellspacing="0"><tr><td'+(capalign?' align="'+capalign+'"':'')+(captionfontclass?' class="'+captionfontclass+'">':'>')+(captionfontclass?'':'<b>'+wrapStr(0,captionsize,'caption'))+capicon+title+(captionfontclass?'':wrapStr(1,captionsize)+'</b>')+'</td>'+closing+'</tr></table>'+ctInnerTable(text)+'</td></tr></table>';}
set_background("");return txt;}
function ctContentBackground(text,picture,hasfullhtml){var txt;if(hasfullhtml){txt=text;}else{with(po){txt='<table width="'+width+'" border="0" cellpadding="0" cellspacing="0" height="'+height+'"><tr><td colspan="3" height="'+padyt+'"></td></tr><tr><td width="'+padxl+'"></td><td valign="TOP"'+(textalign?' align="'+textalign+'"':'')+' width="'+(width-padxl-padxr)+'">'+wrapStr(0,textsize,'text')+text+wrapStr(1,textsize)+'</td><td width="'+padxr+'"></td></tr><tr><td colspan="3" height="'+padyb+'"></td></tr></table>';}}
set_background(picture);return txt;}
function set_background(pic){if(pic==""){if(cNs4)cTip.background.src=null;else if(cTip.style)cTip.style.backgroundImage="none";}else{if(cNs4){cTip.background.src=pic;}else if(cTip.style){cTip.style.width=cTip.pop.width+'px';cTip.style.backgroundImage="url("+pic+")";}}}
function ctInnerTable(text){var txt,cIsMultiple=/,/.test(po.cellpad);with(po){txt='<table width="100%" border="0" '+((cNs4||!cIsMultiple)?'cellpadding="'+cellpad+'" ':'')+'cellspacing="0" '+(fgclass?'class="'+fgclass+'"':fgcolor+' '+fgbackground+' '+height)+'><tr><td valign="TOP"'+(textalign?' align="'+textalign+'"':'')+(textfontclass?' class="'+textfontclass+'">':((!cNs4&&cIsMultiple)?' style="'+setCellPadStr(cellpad)+'">':'>'))+(textfontclass?'':wrapStr(0,textsize,'text'))+text+(textfontclass?'':wrapStr(1,textsize))+'</td></tr></table>';}
return txt;}
function disp(statustext){runHook("disp",FBEFORE,statustext);with(po){if(allowmove==0){runHook("placeLayer",FREPLACE);(cNs6&&ShowId<0)?ShowId=setTimeout("runHook('showObject',FREPLACE,cTip)",1):runHook("showObject",FREPLACE,cTip);allowmove=(!followmouse)?0:1;}}
runHook("disp",FAFTER,statustext);if(statustext!="")self.status=statustext;}
function ctCreatePopup(lyrContent){runHook("ctCreatePopup",FBEFORE,lyrContent);with(po){if(wrap){var wd,ww,cO=(cNs4?cTip:cTip.style);cO.top=cO.left=(cIe4&&!cOp?0:-10000)+(!cNs4?'px':0);layerWrite(lyrContent);wd=(cNs4?cTip.clip.width:cTip.offsetWidth);if(wd>(ww=windowWidth())){lyrContent=lyrContent.replace(/\ /g,' ');width=ww;wrap=0;}}
layerWrite(lyrContent);if(wrap)width=(cNs4?cTip.clip.width:cTip.offsetWidth);}
runHook("ctCreatePopup",FAFTER,lyrContent);return true;}
function ctMouseMove(e){var sCT,sPo,l;e=(e)?e:event;if(e.pageX){cMx=e.pageX;cMy=e.pageY;}
else if(e.clientX){cMx=eval('e.clientX+cFrame.'+docRoot+'.scrollLeft');cMy=eval('e.clientY+cFrame.'+docRoot+'.scrollTop');}
if(cTip){sCT=cTip;sPo=po;l=document.popups;for(i=0;i<l.length;i++){cTip=l[i];po=cTip.pop;if(po.allowmove==1&&!po.sticknow||(po.scroll&&po.showingsticky))runHook("placeLayer",FREPLACE);}
po=sPo;cTip=sCT;if(po.HideForm)hideSelectBox();if(po.hoveringSwitch&&!cNs4&&runHook("cursorOff",FREPLACE)){if(po.delayHide)hideDelay(po.delayHide,cTip);else cClick();po.hoveringSwitch=!po.hoveringSwitch;}}}
function ctMouseCapture(){capExtent=document;var fN,str='',l,k,f,wMv,sS,mseHandler=ctMouseMove;var re=/function\s+(\w*)\(/;wMv=(!cIe4&&window.onmousemove);if(document.onmousemove||wMv){if(wMv)capExtent=window
f=capExtent.onmousemove.toString();fN=f.match(re);if(fN==null){str=f+'(e);';}else if(fN[1]=='anonymous'||fN[1]=='ctMouseMove'||(wMv&&fN[1]=='onmousemove')){if(!cOp&&wMv){l=f.indexOf('{')+1;k=f.lastIndexOf('}');sS=f.substring(l,k);if((l=sS.indexOf('('))!=-1){sS=sS.substring(0,l).replace(/^\s+/,'').replace(/\s+$/,'');if(ud(sS))window.onmousemove=null;else str=sS+'(e);';}}
if(!str){ctCheckMouseCapture=false;return;}}else{if(fN[1])str=fN[1]+'(e);';else{l=f.indexOf('{')+1;k=f.lastIndexOf('}');str=f.substring(l,k);}}
str+='ctMouseMove(e);';mseHandler=new Function('e',str)}
capExtent.onmousemove=mseHandler;if(cNs4)capExtent.captureEvents(Event.MOUSEMOVE)}
function parseTokens(pf,ar){var v,i,md=-1,par=(pf!='cd_');pf=(par)?'po.':pf,fnMark=(par&&!ar.length?1:0);for(i=0;i<ar.length;i++){if(md<0){if(typeof ar[i]=='number'&&ar[i]>pmStart&&ar[i]<pmUpper){fnMark=(par?1:0);i--;}else{switch(pf){case'cd_':cd_text=unpack(ar[i]);break;default:po.text=unpack(ar[i]);}}
md=0;}else{if(ar[i]>=pmCount||ar[i]==DONOTHING||ar[i]==MULTI){continue;}
if(ar[i]==INARRAY){fnMark=0;opt_ARRAY(ar[i],ar[++i],(pf+'text'));continue;}
if(ar[i]==CAPARRAY){opt_ARRAY(ar[i],ar[++i],(pf+'cap'));continue;}
if(ar[i]==STICKY){if(pf!='cd_')eval(pf+'sticky=1');continue;}
if(ar[i]==BACKGROUND){eval(pf+'background="'+ar[++i]+'"');continue;}
if(ar[i]==NOCLOSE){if(pf!='cd_')opt_NOCLOSE();continue;}
if(ar[i]==CAPTION){eval(pf+"cap='"+escSglQuote(ar[++i])+"'");continue;}
if(ar[i]==CENTER||ar[i]==LEFT||ar[i]==RIGHT){eval(pf+'hpos='+ar[i]);continue;}
if(ar[i]==OFFSETX){eval(pf+'offsetx='+ar[++i]);continue;}
if(ar[i]==OFFSETY){eval(pf+'offsety='+ar[++i]);continue;}
if(ar[i]==FGCOLOR){eval(pf+'fgcolor="'+ar[++i]+'"');continue;}
if(ar[i]==BGCOLOR){eval(pf+'bgcolor="'+ar[++i]+'"');continue;}
if(ar[i]==TEXTCOLOR){eval(pf+'textcolor="'+ar[++i]+'"');continue;}
if(ar[i]==CAPCOLOR){eval(pf+'capcolor="'+ar[++i]+'"');continue;}
if(ar[i]==CLOSECOLOR){eval(pf+'closecolor="'+ar[++i]+'"');continue;}
if(ar[i]==WIDTH){eval(pf+'width='+ar[++i]);continue;}
if(ar[i]==BORDER){eval(pf+'border='+ar[++i]);continue;}
if(ar[i]==STATUS){eval(pf+"status='"+escSglQuote(ar[++i])+"'");continue;}
if(ar[i]==AUTOSTATUS){eval(pf+'autostatus=('+pf+'autostatus==1)?0:1');continue;}
if(ar[i]==AUTOSTATUSCAP){eval(pf+'autostatus=('+pf+'autostatus==2)?0:2');continue;}
if(ar[i]==HEIGHT){eval(pf+'height='+pf+'aboveheight='+ar[++i]);continue;}
if(ar[i]==CLOSETEXT){eval(pf+"close='"+escSglQuote(ar[++i])+"'");continue;}
if(ar[i]==SNAPX){eval(pf+'snapx='+ar[++i]);continue;}
if(ar[i]==SNAPY){eval(pf+'snapy='+ar[++i]);continue;}
if(ar[i]==FIXX){eval(pf+'fixx='+ar[++i]);continue;}
if(ar[i]==FIXY){eval(pf+'fixy='+ar[++i]);continue;}
if(ar[i]==RELX){eval(pf+'relx='+ar[++i]);continue;}
if(ar[i]==RELY){eval(pf+'rely='+ar[++i]);continue;}
if(ar[i]==FGBACKGROUND){eval(pf+'fgbackground="'+ar[++i]+'"');continue;}
if(ar[i]==BGBACKGROUND){eval(pf+'bgbackground="'+ar[++i]+'"');continue;}
if(ar[i]==PADX){eval(pf+'padxl='+ar[++i]);eval(pf+'padxr='+ar[++i]);continue;}
if(ar[i]==PADY){eval(pf+'padyt='+ar[++i]);eval(pf+'padyb='+ar[++i]);continue;}
if(ar[i]==FULLHTML){if(pf!='cd_')eval(pf+'fullhtml=1');continue;}
if(ar[i]==BELOW||ar[i]==ABOVE){eval(pf+'vpos='+ar[i]);continue;}
if(ar[i]==CAPICON){eval(pf+'capicon="'+ar[++i]+'"');continue;}
if(ar[i]==TEXTFONT){eval(pf+"textfont='"+escSglQuote(ar[++i])+"'");continue;}
if(ar[i]==CAPTIONFONT){eval(pf+"captionfont='"+escSglQuote(ar[++i])+"'");continue;}
if(ar[i]==CLOSEFONT){eval(pf+"closefont='"+escSglQuote(ar[++i])+"'");continue;}
if(ar[i]==TEXTSIZE){eval(pf+'textsize="'+ar[++i]+'"');continue;}
if(ar[i]==CAPTIONSIZE){eval(pf+'captionsize="'+ar[++i]+'"');continue;}
if(ar[i]==CLOSESIZE){eval(pf+'closesize="'+ar[++i]+'"');continue;}
if(ar[i]==TIMEOUT){eval(pf+'timeout='+ar[++i]);continue;}
if(ar[i]==FUNCTION){if(pf=='cd_'){if(typeof ar[i+1]!='number'){v=ar[++i];cd_function=(typeof v=='function'?v:null);}}else{fnMark=0;v=null;if(typeof ar[i+1]!='number')v=ar[++i];opt_FUNCTION(v);}continue;}
if(ar[i]==DELAY){eval(pf+'delay='+ar[++i]);continue;}
if(ar[i]==HAUTO){eval(pf+'hauto=('+pf+'hauto==0)?1:0');continue;}
if(ar[i]==VAUTO){eval(pf+'vauto=('+pf+'vauto==0)?1:0');continue;}
if(ar[i]==CLOSECLICK){eval(pf+'closeclick=('+pf+'closeclick==0)?1:0');continue;}
if(ar[i]==WRAP){eval(pf+'wrap=('+pf+'wrap==0)?1:0');continue;}
if(ar[i]==FOLLOWMOUSE){eval(pf+'followmouse=('+pf+'followmouse==1)?0:1');continue;}
if(ar[i]==MOUSEOFF){eval(pf+'mouseoff=('+pf+'mouseoff==0)?1:0');v=ar[i+1];if(pf!='cd_'&&eval(pf+'mouseoff')&&typeof v=='number'&&(v<pmStart||v>pmUpper))eval(pf+'delayHide=ar[++i]');continue;}
if(ar[i]==CLOSETITLE){eval(pf+'closetitle="'+ar[++i]+'"');continue;}
if(ar[i]==PUID){if(typeof ar[i+1]!='number'){if(pf=='cd_'){eval(pf+'puid="'+ar[++i]+'"');}}continue;}
if(ar[i]==KEEPCTD){eval(pf+'keepctd=('+pf+'keepctd==0)?1:0');continue;}
if(ar[i]==CSSOFF||ar[i]==CSSCLASS){eval(pf+'css='+ar[i]);continue;}
if(ar[i]==COMPATMODE){eval(pf+'compatmode=('+pf+'compatmode==0)?1:0');continue;}
if(ar[i]==CAPALIGN){eval(pf+'capalign="'+ar[++i].toLowerCase()+'"');continue;}
if(ar[i]==TEXTALIGN){eval(pf+'textalign="'+ar[++i].toLowerCase()+'"');continue;}
if(ar[i]==CELLPAD){i=opt_MULTIPLEARGS(++i,ar,(pf+'cellpad'));continue;}
if(ar[i]==FGCLASS){eval(pf+'fgclass="'+ar[++i]+'"');continue;}
if(ar[i]==BGCLASS){eval(pf+'bgclass="'+ar[++i]+'"');continue;}
if(ar[i]==TEXTFONTCLASS){eval(pf+'textfontclass="'+ar[++i]+'"');continue;}
if(ar[i]==CAPTIONFONTCLASS){eval(pf+'captionfontclass="'+ar[++i]+'"');continue;}
if(ar[i]==CLOSEFONTCLASS){eval(pf+'closefontclass="'+ar[++i]+'"');continue;}
i=parseCmdLine(pf,i,ar);}}
if(par){var obj=eval(pf.substring(0,pf.length-1));with(obj){if(fnMark&&Function)text=callFunction(Function);if(wrap){width=0;var tReg=/<.*\n*>/ig;if(!tReg.test(text))text=text.replace(/[ ]+/g,'&nbsp;');if(!tReg.test(cap))cap=cap.replace(/[ ]+/g,'&nbsp;');}
if(sticky){if(!close&&(cFrame!=cd_frame))close=cd_close;if(mouseoff&&(cFrame==cd_frame))opt_NOCLOSE(' ');}}}}
function layerWrite(txt){var po=cTip.pop;if(po&&!po.doXml)txt+="\n";if(po&&po.doXml)cTip=resetNodeContents(txt,cTip);else if(cNs4){var lyr=cTip.document
lyr.write(txt)
lyr.close()}else if(typeof cTip.innerHTML!=cUdf){if(cIe5&&isMac)cTip.innerHTML=''
cTip.innerHTML=txt}}
function showObject(obj){runHook("showObject",FBEFORE,obj);(cNs4?obj:obj.style).visibility='visible';obj.hasShown=1;runHook("showObject",FAFTER,obj);}
function hideObject(obj){runHook("hideObject",FBEFORE,obj);var po=obj.pop;var Obj=(cNs4?obj:obj.style);if(cNs6&&po&&po.ShowId>0){clearTimeout(po.ShowId);po.ShowId=0;}
Obj.visibility='hidden';Obj.top=Obj.left=(cIe4&&!cOp?0:-10000)+(!cNs4?'px':0);if(po){if(po.timerid>0)clearTimeout(po.timerid);if(po.delayid>0)clearTimeout(po.delayid);po.timerid=0;po.delayid=0;po.hoveringSwitch=false;}
self.status="";if(obj.onmouseout||obj.onmouseover){if(cNs4)obj.releaseEvents(Event.MOUSEOUT||Event.MOUSEOVER);obj.onmouseout=obj.onmouseover=null;}
runHook("hideObject",FAFTER,obj);deletePopup(obj);}
function repositionTo(obj,xL,yL){var Obj=(cNs4?obj:obj.style);Obj.left=xL+(!cNs4?'px':0);Obj.top=yL+(!cNs4?'px':0);}
function cursorOff(){var left,top,right,bottom;left=parseInt(cTip.style.left);top=parseInt(cTip.style.top);right=left+(po.shadow&&!isNaN(po.width)?parseInt(po.width):cTip.offsetWidth);bottom=top+(po.shadow&&!isNaN(po.aboveheight)?parseInt(po.aboveheight):cTip.offsetHeight);return(cMx<left||cMx>right||cMy<top||cMy>bottom);}
function opt_FUNCTION(callme){po.text=(callme?(typeof callme=='string'?(/.+\(.*\)/.test(callme)?eval(callme):callme):callme()):(po.Function?callFunction(po.Function):'No Function'));return 0;}
function opt_NOCLOSE(unused){if(!unused)po.close="";if(cNs4){cTip.captureEvents(Event.MOUSEOUT||Event.MOUSEOVER);cTip.onmouseout=function(e){cTip=e.target;po=cTip.pop;if(po.delayHide)hideDelay(po.delayHide,cTip);else cClick(e);}}
cTip.onmouseover=function(e){e=(e)?e:event;if(/mouseover/i.test(e.type)){cTip=this;po=cTip.pop;if(!cNs4)po.hoveringSwitch=true;if(po.timerid>0){clearTimeout(po.timerid);po.timerid=0;}
if(cNs4)return routeEvent(e);}}
return 0;}
function opt_MULTIPLEARGS(i,args,parameter){var k=i,l,re,pV,str='';for(k=i;k<args.length;k++){if(typeof args[k]=='number'&&args[k]>pmStart)break;str+=args[k]+',';}
if(str)str=str.replace(/,$/,'');k--;pV=(cNs4&&/cellpad/i.test(parameter))?str.split(',')[0]:str;eval(parameter+'="'+pV+'"');return k;}
function opt_ARRAY(cmd,cmd_value,parameter){var v=pms[cmd-pmStart-1],ar=(v=='inarray'?cd_texts[cmd_value]:(v=='caparray'?cd_caps[cmd_value]:''));return eval(parameter+'=ar');}
function nbspCleanup(){if(po&&po.wrap){po.text=po.text.replace(/&nbsp;/g,' ');po.cap=po.cap.replace(/&nbsp;/g,' ');}}
function escSglQuote(str){return unpack(str).replace(/'/g,"\\'");}
function ctLoadHandler(e){var re=/\w+\(.*\)[;\s]+/g,olre=/coolTip\(|nd\(|cClick\(/,fn,l,i;if(!cLoaded)cLoaded=1;if(window.removeEventListener&&e.eventPhase==3)window.removeEventListener("load",ctLoadHandler,false);else if(window.detachEvent){window.detachEvent("onload",ctLoadHandler);var fN=document.body.getAttribute('onload');if(fN){fN=fN.toString().match(re);if(fN&&fN.length){for(i=0;i<fN.length;i++){if(/anonymous/.test(fN[i]))continue;while((l=fN[i].search(/\)[;\s]+/))!=-1){fn=fN[i].substring(0,l+1);fN[i]=fN[i].substring(l+2);if(olre.test(fn))eval(fn);}}}}}}
function wrapStr(endWrap,fontSizeStr,whichString){var fontStr,fontColor,rtnVal,isClose=((whichString=='close')?1:0),hasDims=/[%\-a-z]+$/.test(fontSizeStr);fontSizeStr=(cNs4)?(!hasDims?fontSizeStr:'1'):fontSizeStr;if(endWrap)rtnVal=(hasDims&&!cNs4)?(isClose?'</span>':'</div>'):'</font>';else{fontStr='po.'+whichString+'font';fontColor='po.'+((whichString=='caption')?'cap':whichString)+'color';rtnVal=(hasDims&&!cNs4)?(isClose?'<span style="font-family: '+quoteMultiNameFonts(eval(fontStr))+';color: '+eval(fontColor)+';font-size: '+fontSizeStr+';">':'<div style="font-family: '+quoteMultiNameFonts(eval(fontStr))+';color: '+eval(fontColor)+';font-size: '+fontSizeStr+';">'):'<font face="'+eval(fontStr)+'" color="'+eval(fontColor)+'" size="'+(parseInt(fontSizeStr)>7?'7':fontSizeStr)+'">';}
return rtnVal;}
function quoteMultiNameFonts(theFont){var v,pM=theFont.split(',');for(var i=0;i<pM.length;i++){v=pM[i];v=v.replace(/^\s+/,'').replace(/\s+$/,'');if(/\s/.test(v)&&!/['"]/.test(v)){v="\'"+v+"\'";pM[i]=v;}}
return pM.join();}
function isExclusive(args){return false;}
function hideDelay(time,lyr){var po=lyr.pop;if(lyr&&po){if(time&&!po.delay){if(po.timerid>0)clearTimeout(po.timerid);po.timerid=setTimeout("cClick('"+lyr.id+"')",(po.timeout=time));}}}
function setCellPadStr(parameter){var Str='',j=0,ary,top,bottom,left,right;Str+='padding: ';ary=parameter.replace(/\s+/g,'').split(',');switch(ary.length){case 2:top=bottom=ary[j];left=right=ary[++j];break;case 3:top=ary[j];left=right=ary[++j];bottom=ary[++j];break;case 4:top=ary[j];right=ary[++j];bottom=ary[++j];left=ary[++j];break;}
Str+=((ary.length==1)?ary[0]+'px;':top+'px '+right+'px '+bottom+'px '+left+'px;');return Str;}
function divID(args){var theDiv='';for(var i=0;i<args.length;i++){if(typeof args[i]!='number'||args[i]!=PUID)continue;if(typeof args[i+1]=='number')continue;theDiv=args[i+1];break;}
return theDiv;}
function hasKeepCtD(a){if(typeof a=='object')if(hasCommand(0,a,KEEPCTD)>=0)return(po&&po.keepctd==0)?true:false;return(po&&po.keepctd)?true:false;}
function hasCommand(istrt,args,COMMAND){for(var i=istrt;i<args.length;i++){if(typeof args[i]=='number'&&args[i]==COMMAND)return i;}
return-1;}
function setPosition(obj){if(typeof obj=='object'){obj.sticknow=1;}
return 1;}
function unpack(txt){if(typeof decodeURLComponent!=cUdf)return decodeURIComponent(txt);else return unescape(txt);}
function initLayerObject(theDiv,isMultiple,frm){theDiv=(theDiv||'ctDiv');isMultiple=(isMultiple||!/ctDiv/.test(theDiv));isMultiple=(cNs6&&isMultiple);var lyr,obj;lyr=createDivContainer(theDiv,frm);lyr.hasShown=(isMultiple?1:0);lyr.pop=new PopObject(lyr);obj=(cNs4?lyr:lyr.style);if(obj)obj.zIndex=getNextZ(lyr);return lyr;}
function createDivContainer(id,frm,zVal){id=(id||'ctDiv'),frm=(frm||cFrame),zVal=(zVal||1000);var objRef,divContainer=fetchObjectLyr(id);if(divContainer==null){if(cNs4){divContainer=frm.document.layers[id]=new Layer(window.innerWidth,frm);objRef=divContainer;}else{var body=(cIe4?frm.document.all.tags('BODY')[0]:frm.document.getElementsByTagName("BODY")[0]);if(cIe4&&!document.getElementById){body.insertAdjacentHTML("beforeEnd",'<div id="'+id+'"></div>');divContainer=layerReference(id);}else{divContainer=frm.document.createElement("DIV");divContainer.id=id;body.appendChild(divContainer);}
objRef=divContainer.style;}
objRef.position='absolute';objRef.visibility='hidden';objRef.zIndex=zVal;objRef.top=objRef.left=(cIe4&&!cOp?0:-10000)+(!cNs4?'px':0);}
return divContainer;}
function horizontalPlacement(browserWidth,horizontalScrollAmount,widthFix){var placeX,rD=0,ofx,iwidth=browserWidth,winoffset=horizontalScrollAmount;var parsedWidth=(po.shadow&&!isNaN(po.width))?parseInt(po.width):(cNs4?cTip.clip.width:cTip.offsetWidth);if(po.fixx>-1||po.relx!=null){placeX=(po.relx!=null?(po.relx<0?winoffset+po.relx+iwidth-parsedWidth-widthFix:winoffset+po.relx):po.fixx);}else{if(po.hauto==1){ofx=Math.abs(po.offsetx);if((cMx-winoffset)>(iwidth/2)&&cMx-winoffset+(parsedWidth+ofx)>(iwidth-widthFix)){po.hpos=LEFT;rD=1;}else if((cMx-ofx-parsedWidth)<winoffset){po.hpos=RIGHT;rD=1;}
if(rD)po.offsetx=Math.abs(cd_offsetx);}
if(po.hpos==CENTER||po.hpos==RIGHT){placeX=cMx+po.offsetx;if(po.hpos==CENTER)placeX-=(parsedWidth/2);if((placeX+parsedWidth)>(winoffset+iwidth-widthFix))placeX=iwidth+winoffset-parsedWidth-widthFix;if(placeX<winoffset)placeX=winoffset;}
if(po.hpos==LEFT){placeX=cMx-po.offsetx-parsedWidth;if(placeX<winoffset)placeX=winoffset;}
if(po.snapx>1){var snapping=placeX%po.snapx;if(po.hpos==LEFT){placeX=placeX-(po.snapx+snapping);}else{placeX=placeX+(po.snapx-snapping);}
if(placeX<winoffset)placeX=winoffset;}}
return placeX;}
function verticalPlacement(browserHeight,verticalScrollAmount){var placeY,rD=0,ofy,iheight=browserHeight,scrolloffset=verticalScrollAmount;var parsedHeight=(po.shadow&&!isNaN(po.aboveheight))?parseInt(po.aboveheight):(cNs4?cTip.clip.height:cTip.offsetHeight);if(po.fixy>-1||po.rely!=null){placeY=(po.rely!=null?(po.rely<0?scrolloffset+po.rely+iheight-parsedHeight:scrolloffset+po.rely):po.fixy);}else{if(po.vauto==1){ofy=Math.abs(po.offsety);if((cMy-scrolloffset)>(iheight/2)){if(cMy-scrolloffset+parsedHeight+ofy>iheight){po.vpos=ABOVE;rD=1;}}else if(cMy-scrolloffset-ofy-parsedHeight<0){po.vpos=BELOW;rD=1;}
if(rD)po.offsety=Math.abs(cd_offsety);}
if(po.vpos==ABOVE){placeY=cMy-(parsedHeight+po.offsety);if(placeY<scrolloffset)placeY=scrolloffset;}else{placeY=cMy+po.offsety;}
if(po.snapy>1){var snapping=placeY%po.snapy;if(parsedHeight>0&&po.vpos==ABOVE){placeY=placeY-(po.snapy+snapping);}else{placeY=placeY+(po.snapy-snapping);}
if(placeY<scrolloffset)placeY=scrolloffset;}}
return placeY;}
function placeLayer(){var placeX,placeY,winoffset,scrolloffset,iwidth,iheight,widthFix=0;if(cFrame.innerWidth)widthFix=20;iwidth=windowWidth();winoffset=(cIe4)?eval('cFrame.'+docRoot+'.scrollLeft'):cFrame.pageXOffset;placeX=runHook('horizontalPlacement',FCHAIN,iwidth,winoffset,widthFix);if(cFrame.innerHeight)iheight=cFrame.innerHeight;else if(eval('cFrame.'+docRoot)&&eval("typeof cFrame."+docRoot+".clientHeight=='number'")&&eval('cFrame.'+docRoot+'.clientHeight'))
iheight=eval('cFrame.'+docRoot+'.clientHeight');scrolloffset=(cIe4)?eval('cFrame.'+docRoot+'.scrollTop'):cFrame.pageYOffset;placeY=runHook('verticalPlacement',FCHAIN,iheight,scrolloffset);repositionTo(cTip,placeX,placeY);}
function windowWidth(){var w;if(cFrame.innerWidth)w=cFrame.innerWidth;else if(eval('cFrame.'+docRoot)&&eval("typeof cFrame."+docRoot+".clientWidth=='number'")&&eval('cFrame.'+docRoot+'.clientWidth'))
w=eval('cFrame.'+docRoot+'.clientWidth');return w;}
function setRunTimeVariables(obj){if(typeof runTime!=cUdf&&runTime.length)
for(var k=0;k<runTime.length;k++)runTime[k](obj);}
function parseCmdLine(pf,i,args){if(typeof cmdLine!=cUdf&&cmdLine.length){for(var k=0;k<cmdLine.length;k++){var j=cmdLine[k](pf,i,args);if(j>-1){i=j;break;}}}
return i;}
function postParseChecks(pf,args){var rtnVal=true;if(typeof postParse!=cUdf&&postParse.length){for(var k=0;k<postParse.length;k++){if(postParse[k](pf,args))continue;rtnVal=false;break;}}
return rtnVal;}
function setDefaultVariables(xVar){if(xVar&&typeof xVar=='string'){var v,j,k,vN,val=xVar.split('|'),y,a;for(k=0;k<val.length;k++){v=val[k];vN=val[++k];if(v=='caption'){if(ud('cap'))cd_cap=(!vN)?'':'"'+vN+'"';continue;}
if(/autostatuscap|caparray|donothing|inarray|noclose/.test(v)){continue;}
if(/above|below/.test(v)){if(vN&&ud('vpos'))cd_vpos=eval(vN);continue;}
if(/closetext/.test(v)){if(ud('close'))cd_close=vN;continue;}
if(/cssoff|cssstyle|cssw3c|cssclass/.test(v)){if(vN&&ud('css'))cd_css=eval(vN);continue;}
if(/border|captionsize|closesize|textsize|width/.test(v)){if(ud(v))eval('cd_'+v+'="'+vN+'"');continue;}
if(/autostatus|function|relx|rely|frame/.test(v)){if(ud(v))eval('cd_'+v+'='+vN);continue;}
if(/padx|pady/.test(v)){a=vN.split(':');if(a.length==1)a[a.length++]=a[0];y=(v=='pady');for(j=0;j<2;j++)
if(ud(v+(j?(y?'b':'r'):(y?'t':'l'))))eval('cd_'+v+(j?(y?'b':'r'):(y?'t':'l'))+'='+a[j]);continue;}
if(v=='center'||/left|right/.test(v)){if(vN&&ud('hpos'))cd_hpos=eval(vN);continue;}
if(ud(v))eval('cd_'+v+'='+(!vN||isNaN(vN)?'"'+vN+'"':Number(vN)));}}}
function isFunction(fnRef){var rtn=true;if(typeof fnRef=='object'){for(var i=0;i<fnRef.length;i++){if(typeof fnRef[i]=='function')continue;rtn=false;break;}}else if(typeof fnRef!='function')rtn=false;return rtn;}
function argToString(array,strtInd,argName){var jS=strtInd,aS='',ar=array;argName=(argName?argName:'ar');if(ar.length>jS){for(var k=jS;k<ar.length;k++)aS+=argName+'['+k+'], ';aS=aS.substring(0,aS.length-2);}
return aS;}
function reOrder(hookPt,fnRef,order){var newPt=new Array(),match,i,j;if(!order||typeof order==cUdf||typeof order=='number')return hookPt;if(typeof order=='function'){if(typeof fnRef=='object')newPt=newPt.concat(fnRef);else newPt[newPt.length++]=fnRef;for(i=0;i<hookPt.length;i++){match=false;if(typeof fnRef=='function'&&hookPt[i]==fnRef)continue;else{for(j=0;j<fnRef.length;j++)if(hookPt[i]==fnRef[j]){match=true;break;}}
if(!match)newPt[newPt.length++]=hookPt[i];}
newPt[newPt.length++]=order;}else if(typeof order=='object'){if(typeof fnRef=='object')newPt=newPt.concat(fnRef);else newPt[newPt.length++]=fnRef;for(j=0;j<hookPt.length;j++){match=false;if(typeof fnRef=='function'&&hookPt[j]==fnRef)continue;else{for(i=0;i<fnRef.length;i++)if(hookPt[j]==fnRef[i]){match=true;break;}}
if(!match)newPt[newPt.length++]=hookPt[j];}
hookPt=newPt;newPt.length=0;for(j=0;j<hookPt.length;j++){match=false;for(i=0;i<order.length;i++){if(hookPt[j]==order[i]){match=true;break;}}
if(!match)newPt[newPt.length++]=hookPt[j];}
newPt=newPt.concat(order);}
hookPt=newPt;return hookPt;}
function callFunction(f){return(typeof f=='function'?f():'No Function');}
function getNextZ(theLyr){var cObj,obj,zVal;if(typeof cZindex==cUdf){cObj=fetchObjectLyr('ctDiv');cZindex=(cObj)?(cNs4?cObj.zIndex:cObj.style.zIndex):1000;}
zVal=cZindex;if(typeof document.popups==cUdf){document.popups=new Array();document.popups[0]=theLyr;}else{var l=document.popups;if(l.length){obj=l[l.length-1];l[l.length++]=theLyr;zVal=parseInt((cNs4?obj:obj.style).zIndex)+1;}else l[l.length++]=theLyr;}
return zVal;}
function isCloseAllLyr(obj){var i,j,pLyr=parentLyrs,rV=0;if(pLyr.length){for(i=0;i<pLyr.length;i++){if(typeof pLyr[i].pop!=cUdf&&pLyr[i].pop.closeall&&obj==pLyr[i]){rV=1;break;}}}
return rV;}
function deletePopup(obj){var l=document.popups;if(typeof l!=cUdf){var tmpArr=new Array(),theRef;for(var i=0;i<l.length;i++){if(l[i]==obj)continue;theRef=(cNs4)?l[i]:l[i].style;if(isCloseAllLyr(obj))theRef.visibility='hidden';else tmpArr[tmpArr.length++]=l[i];}
document.popups=tmpArr;}}
function fetchObjectLyr(id){if(typeof id=='object')return(cNs4?id.target:id);else return(cNs4?cFrame.document.layers[id]:(document.all?cFrame.document.all[id]:cFrame.document.getElementById(id)));}
function registerCommands(cmdStr){if(typeof cmdStr=='string'){var pM=cmdStr.split(',');pms=pms.concat(pM);for(var i=0;i<pM.length;i++)
eval(pM[i].toUpperCase()+'='+pmCount++);}}
function registerNoParameterCommands(cmdStr){if(!cmdStr&&typeof cmdStr!='string')return;pmt=(!pmt)?cmdStr:pmt+','+cmdStr;}
function registerHook(fnHookTo,fnRef,hookType,optPm){var hookPt,last=typeof optPm;if(fnHookTo=='plgIn'||fnHookTo=='postParse')return;if(typeof hookPts[fnHookTo]==cUdf)hookPts[fnHookTo]=new FunctionReference();hookPt=hookPts[fnHookTo];if(hookType!=null){if(hookType==FREPLACE){hookPt.ovload=fnRef;if(/ctContent/.test(fnHookTo))hookPt.alt[pms[CSSOFF-1-pmStart]]=fnRef;}else if(hookType==FBEFORE||hookType==FAFTER){hookPt=(hookType==1?hookPt.before:hookPt.after);if(typeof fnRef=='object')hookPt=hookPt.concat(fnRef);else hookPt[hookPt.length++]=fnRef;if(optPm)hookPt=reOrder(hookPt,fnRef,optPm);}else if(hookType==FALTERNATE){if(last=='number')hookPt.alt[pms[optPm-1-pmStart]]=fnRef;}else if(hookType==FCHAIN){hookPt=hookPt.chain;if(typeof fnRef=='object')hookPt=hookPt.concat(fnRef);else hookPt[hookPt.length++]=fnRef;}}}
function registerRunTimeFunction(fn){if(isFunction(fn)){if(typeof fn=='object')runTime=runTime.concat(fn);else runTime[runTime.length++]=fn;}}
function registerCmdLineFunction(fn){if(isFunction(fn)){if(typeof fn=='object')cmdLine=cmdLine.concat(fn);else cmdLine[cmdLine.length++]=fn;}}
function registerPostParseFunction(fn){if(isFunction(fn)){if(typeof fn=='object')postParse=postParse.concat(fn);else postParse[postParse.length++]=fn;}}
function runHook(fnHookTo,hookType){var hookPt=hookPts[fnHookTo],k,reslt=null,optPm,arS,ar=arguments;if(hookType==FREPLACE){arS=argToString(ar,2);if(typeof hookPt==cUdf||!(hookPt=hookPt.ovload))reslt=eval(fnHookTo+'('+arS+')');else reslt=eval('hookPt('+arS+')');}else if(hookType==FBEFORE||hookType==FAFTER){if(typeof hookPt!=cUdf){hookPt=(hookType==1?hookPt.before:hookPt.after);if(hookPt.length){arS=argToString(ar,2);for(k=0;k<hookPt.length;k++)eval('hookPt[k]('+arS+')');}}}else if(hookType==FALTERNATE){optPm=ar[2];arS=argToString(ar,3);if(typeof hookPt==cUdf||(hookPt=hookPt.alt[pms[optPm-1-pmStart]])==cUdf)reslt=eval(fnHookTo+'('+arS+')');else reslt=eval('hookPt('+arS+')');}else if(hookType==FCHAIN){arS=argToString(ar,2);hookPt=hookPt.chain;for(k=hookPt.length;k>0;k--)if((reslt=eval('hookPt[k-1]('+arS+')'))!=void(0))break;}
return reslt;}
function FunctionReference(){this.ovload=null;this.before=new Array();this.after=new Array();this.alt=new Array();this.chain=new Array();}
function Info(version,prerelease){this.version=version;this.prerelease=prerelease;this.simpleversion=Math.round(this.version*100);this.major=parseInt(this.simpleversion/100);this.minor=parseInt(this.simpleversion/10)-this.major*10;this.revision=parseInt(this.simpleversion)-this.major*100-this.minor*10;this.meets=meets;}
function meets(reqdVersion){return(!reqdVersion)?false:this.simpleversion>=Math.round(100*parseFloat(reqdVersion));}
function PopObject(lyr){var y,j,k,cmds=coreCmds.split(',');this.text=cd_text;this.cap=cd_cap;this.timerid=0;this.allowmove=0;this.delayid=0;this.closeall=0;this.hoveringSwitch=false;this.fnRef=''
this.showingsticky=0;this.removecounter=0;this.ShowId=(lyr.hasShown||(cTip&&/ctDiv/.test(cTip.id)&&cTip.hasShown))?0:-1;this.scroll=0;this.sticknow=0;this.doXml=0;this.HideForm=0;this.delayHide=0;this.aboveheight=cd_aboveheight;this.shadow=0;for(k=0;k<cmds.length;k++){if(cmds[k]=='caption'){continue;}
if(/autostatuscap|cssclass|donothing|inarray|caparray|noclose/.test(cmds[k])){continue;}
if(/above|below/.test(cmds[k])){this.vpos=cd_vpos;continue;}
if(/closetext/.test(cmds[k])){this.close=cd_close;continue;}
if(/cssoff/.test(cmds[k])){this.css=cd_css;continue;}
if(/function/.test(cmds[k])){this.Function=cd_function;continue;}
if(cmds[k]=='center'||/left|right/.test(cmds[k])){this.hpos=cd_hpos;continue;}
if(/padx|pady/.test(cmds[k])){y=(cmds[k]=='pady');for(j=0;j<2;j++)eval('this.'+cmds[k]+(j?(y?'b':'r'):(y?'t':'l'))+'=cd_'+cmds[k]+(j?(y?'b':'r'):(y?'t':'l')));continue;}
eval('this.'+cmds[k]+'=cd_'+cmds[k]);}}
registerHook("ctContentSimple",ctContentSimple,FALTERNATE,CSSOFF);registerHook("ctContentCaption",ctContentCaption,FALTERNATE,CSSOFF);registerHook("ctContentBackground",ctContentBackground,FALTERNATE,CSSOFF);registerHook("ctContentSimple",ctContentSimple,FALTERNATE,CSSCLASS);registerHook("ctContentCaption",ctContentCaption,FALTERNATE,CSSCLASS);registerHook("ctContentBackground",ctContentBackground,FALTERNATE,CSSCLASS);registerHook("hideObject",nbspCleanup,FAFTER);registerHook("horizontalPlacement",horizontalPlacement,FCHAIN);registerHook("verticalPlacement",verticalPlacement,FCHAIN);registerHook('setPosition',setPosition,FCHAIN);if(cNs4||(cIe5&&isMac)||cKq)cLoaded=1;registerNoParameterCommands('sticky,autostatus,autostatuscap,fullhtml,hauto,vauto,closeclick,wrap,followmouse,mouseoff,compatmode');var ctCheckMouseCapture=true;if((cNs4||cNs6||cIe4))ctMouseCapture();if(typeof cInfo==cUdf||!cInfo.meets(1.00))alert('coolTip 1.00 or later is required for the Centerpopup Plugin.');else{registerCommands('centerpopup,centeroffset');setDefaultVariables('centerpopup|0|centeroffset|');function setCenterPopupVariables(obj){obj.centerpopup=cd_centerpopup;obj.centeroffset=cd_centeroffset;}
function parseCenterPopupExtras(pf,i,ar){var k=i,v;if(k<ar.length){if(ar[k]==CENTERPOPUP){eval(pf+'centerpopup=('+pf+'centerpopup==0)?1:0');return k;}
if(ar[k]==CENTEROFFSET){k=opt_MULTIPLEARGS(++k,ar,(pf+'centeroffset'));return k;}}
return-1;}
function centerPopupHorizontal(browserWidth,horizontalScrollAmount,widthFix){if(!po.centerpopup)return void(0);var vdisp=po.centeroffset.split(','),placeX,iwidth=browserWidth,winoffset=horizontalScrollAmount,pWd;pWd=(!isNaN(po.width)&&po.width)?parseInt(po.width):(cNs4?cTip.clip.width:cTip.offsetWidth);placeX=winoffset+Math.round((iwidth-widthFix-pWd)/2)+Number(vdisp[0]);with(po){if(typeof followscroll!=cUdf&&followscroll&&sticky)relx=placeX;}
return placeX;}
function centerPopupVertical(browserHeight,verticalScrollAmount){if(!po.centerpopup)return void(0);var placeY,iheight=browserHeight,scrolloffset=verticalScrollAmount;with(po){var vdisp=centeroffset.split(',');var pHeight=(!isNaN(aboveheight)&&aboveheight?parseInt(aboveheight):(cNs4?cTip.clip.height:cTip.offsetHeight));placeY=scrolloffset+Math.round((iheight-pHeight)/2)+(vdisp.length>1?Number(vdisp[1]):0);if(typeof followscroll!=cUdf&&followscroll&&sticky)rely=placeY;}
return placeY;}
registerRunTimeFunction(setCenterPopupVariables);registerCmdLineFunction(parseCenterPopupExtras);registerHook('horizontalPlacement',centerPopupHorizontal,FCHAIN);registerHook('verticalPlacement',centerPopupVertical,FCHAIN);if(cInfo.meets(1.00))registerNoParameterCommands('centerpopup');}
if(typeof cInfo==cUdf||!cInfo.meets(1.00))alert('coolTip 1.00 or later is required for the Draggable Plugin.');else{registerCommands('draggable,dragcap,altcut,dragimg,hidecontent');setDefaultVariables('draggable|0|dragcap|0|altcut|0|dragimg||hidecontent|0');var cMseMv,cMseOvr,cOp8=(cOp&&parseFloat(navigator.appVersion)>8.0);function setDragVariables(obj){obj.draggable=cd_draggable;obj.dragcap=cd_dragcap;obj.beingDragged=0;obj.altcut=cd_altcut;obj.dragimg=cd_dragimg;obj.hidecontent=cd_hidecontent;obj.contentLocation=obj.imgObject=obj.dragObject=null;}
function parseDragExtras(pf,i,ar){var v,k=i;if(k<ar.length){if(ar[k]==DRAGGABLE){eval(pf+'draggable=('+pf+'draggable==0)?1:0');return k;}
if(ar[k]==DRAGCAP){if(pf!='cd_')eval(pf+'draggable=1');eval(pf+'dragcap=('+pf+'dragcap==0)?1:0');return k;}
if(ar[k]==ALTCUT){eval(pf+'altcut=('+pf+'altcut==0)?1:0');return k;}
if(ar[k]==DRAGIMG){eval(pf+'dragimg="'+ar[++k]+'"');return k;}
if(ar[k]==HIDECONTENT){eval(pf+'hidecontent=('+pf+'hidecontent==0)?1:0');return k;}}
return-1;}
function setOverTrip(obj){var pO=obj.pop;if(pO){if(cNs4)obj.captureEvents(Event.MOUSEOVER);obj.onmouseover=function(e){e=(e)?e:event;if(/mouseover/i.test(e.type)&&!this.pop.beingDragged){cTip=this;po=cTip.pop;if(cMseOvr){if(!cNs4)po.hoveringSwitch=true;if(po.timerid>0){clearTimeout(po.timerid);po.timerid=0;}}
if(po.draggable&&!cTip.onmousedown)startDrag();}
if(cNs4)return routeEvent(e);}}}
function startDrag(content){with(po){if(draggable){if(sticky&&(cFrame==cd_frame)){cMseOvr=(cTip.onmouseover!=null&&/timerid/.test(cTip.onmouseover.toString()));if(!cTip.onmouseover||!/draggable/.test(cTip.onmouseover.toString()))setOverTrip(cTip,cMseOvr);initDrag(cTip);}else draggable=0;}}}
function stopDrag(obj){if(obj.pop.draggable)endDrag(obj);}
function initDrag(obj){cMseMv=capExtent.onmousemove;var po=obj.pop;if(cNs4){obj.captureEvents(Event.MOUSEDOWN|Event.CLICK);obj.onmousedown=grabEl;obj.onclick=function(e){return routeEvent(e);}}else{obj.onmousedown=grabEl;}
with(po){if(dragimg)chkForImgSupport(dragimg);}
return true;}
function chkForImgSupport(dragImg){if(dragImg){with(po){dragimg=dragImg;if(typeof getAnchorObjRef!=cUdf)imgObject=getAnchorObjRef(dragImg);if(imgObject==null)dragimg='';}}}
function checkBodyImages(content){var obj,objI,objT,tT,rR,cC,kW3C=(document.getElementsByTagName)?1:0;if(!cNs4&&po.draggable){with(po){obj=kW3C?cTip.getElementsByTagName("table"):cTip.tags("table");if(dragcap){tT=((typeof CSSW3C!=cUdf&&css==CSSW3C))?0:1;rR=0;objT=kW3C?obj[tT].getElementsByTagName("tr")[rR]:obj[tT].all.tags("tr")[rR];if(objT)dragObject=objT;}else{tT=((typeof CSSW3C!=cUdf&&css==CSSW3C)||background)?0:(obj.length>2?2:1);rR=((typeof CSSW3C!=cUdf&&css==CSSW3C)&&cap||background)?1:0;if(hidecontent)contentLocation=tT+":"+rR;objI=kW3C?obj[tT].getElementsByTagName("img"):obj[tT].all.tags("img");if(objI){for(var i=0;i<objI.length;i++){if(objI[i].name!=dragimg)continue;objI[i].id=dragimg;if(hidecontent)contentLocation=null;if(capicon){tT=(typeof CSSW3C!=cUdf&&css==CSSW3C)?0:1;rR=cC=0;objT=kW3C?obj[tT].getElementsByTagName("tr")[rR].getElementsByTagName("td")[cC]:obj[tT].all.tags("tr")[rR].all.tags("td")[cC];objI=kW3C?objT.getElementsByTagName("img"):objT.all.tags("img");if(objI){objI[0].removeAttribute("name");objI[0].removeAttribute("id");objI[0].removeAttribute("alt");objI[0].removeAttribute("title");}}}}}}}}
function setCursor(on){if(cNs4)return;cTip.style.cursor=(on?'move':'auto');}
function chkCursorPosition(Obj,XPos,YPos){var pos,Top,Left,iObj;if(Obj){with(po){anchorx=anchory=0;if(dragcap){Left=pageLocation(Obj,'Left');Top=pageLocation(Obj,'Top');if(XPos<Left||XPos>(Left+Obj.offsetWidth)||YPos<Top||YPos>(Top+Obj.offsetHeight))return false;}else if(dragimg){anchoralign='LR';pos=getAnchorLocation(Obj);iObj=(cNs4)?Obj[0]:Obj;if(XPos<pos[0]||XPos>(pos[0]+iObj.width)||YPos<pos[1]||YPos>(pos[1]+iObj.height))return false;}}}
return true;}
function grabEl(e){e=(e)?e:event;var X,Y;if(po.dragObject||(po.altcut?!cKy:cKy)){po.beingDragged=1;if(!cNs4&&po.hidecontent)showHideContent(e,'hide');X=(e.pageX||eval('e.clientX+cFrame.'+docRoot+'.scrollLeft'));Y=(e.pageY||eval('e.clientY+cFrame.'+docRoot+'.scrollTop'));if(chkCursorPosition(po.dragcap?po.dragObject:po.imgObject,X,Y)){capExtent.onmousemove=moveEl;if(cNs4)cTip.captureEvents(Event.MOUSEUP);cTip.onmouseup=function(e){setCursor(0);if(cIe4)this.onselectstart=null;this.pop.beingDragged=0;if(this.pop.hidecontent&&this.pop.contentLocation)showHideContent(e);capExtent.onmousemove=cMseMv;}
setCursor(1);if(cIe4)cTip.onselectstart=function(){return false;}
if(cNs4){cX=X
cY=Y}else{cX=X-(cNs4?cTip.left:parseInt(cTip.style.left));cY=Y-(cNs4?cTip.top:parseInt(cTip.style.top));}
return(cNs4?routeEvent(e):false);}}else setCursor(0);}
function moveEl(e){e=(e)?e:event;var dX,dY,X,Y;X=(e.pageX||eval('e.clientX+cFrame.'+docRoot+'.scrollLeft'));Y=(e.pageY||eval('e.clientY+cFrame.'+docRoot+'.scrollTop'));if(chkCursorPosition(po.dragcap?po.dragObject:po.imgObject,X,Y)){if(cNs4){dX=X-cX;cX=X;dY=Y-cY;cY=Y;cTip.moveBy(dX,dY);}else
repositionTo(cTip,X-cX,Y-cY);}}
function showHideContent(e,whichType){e=(e)?e:event;var obj,cL,tT,rR,kW3C=(document.getElementsByTagName)?1:0;if(po.hidecontent&&po.contentLocation){cL=po.contentLocation.split(':');tT=parseInt(cL[0]);rR=parseInt(cL[1]);obj=kW3C?cTip.getElementsByTagName("table"):cTip.tags("table");obj=kW3C?obj[tT].getElementsByTagName("tr")[rR].getElementsByTagName("td")[0]:obj[tT].all.tags("tr")[rR].all.tags("td")[0];obj.style.visibility=(!whichType)?'visible':'hidden';}}
function endDrag(obj){if(!obj)obj=cTip;if(cNs4){obj.releaseEvents(Event.MOUSEDOWN|Event.MOUSEUP|Event.CLICK);obj.onmousedown=obj.onmouseup=obj.onclick=null;}else{obj.onmousedown=null;if(obj.pop.hidecontent&&obj.pop.contentLocation)obj.onmouseup=null;}}
registerRunTimeFunction(setDragVariables);registerCmdLineFunction(parseDragExtras);registerHook("disp",startDrag,FBEFORE);registerHook("hideObject",stopDrag,FAFTER);registerHook("ctCreatePopup",checkBodyImages,FAFTER);if(cInfo.meets(1.00))registerNoParameterCommands('draggable,dragcap,altcut,hidecontent');}
if(typeof cInfo==cUdf||!cInfo.meets(1.00))alert('coolTip 1.50 or later is required for the Exclusive Plugin.');else{registerCommands('exclusive,exclusivestatus,exclusiveoverride');var cOverrideIsSet;setDefaultVariables('exclusive|0|exclusivestatus|Please close open popup first.');function setExclusiveVariables(obj){obj.exclusive=cd_exclusive;obj.exclusivestatus=cd_exclusivestatus;}
function parseExclusiveExtras(pf,i,ar){var k=i,v;cOverrideIsSet=false;if(k<ar.length){if(ar[k]==EXCLUSIVEOVERRIDE){if(pf!='cd_')cOverrideIsSet=true;return k;}
if(ar[k]==EXCLUSIVE){eval(pf+'exclusive=('+pf+'exclusive==0)?1:0');return k;}
if(ar[k]==EXCLUSIVESTATUS){eval(pf+"exclusivestatus='"+escSglQuote(ar[++k])+"'");return k;}}
return-1;}
function isExclusive(args){var rtnVal=false;if(args!=null)rtnVal=(hasCommand(0,args,EXCLUSIVEOVERRIDE)>-1);if(rtnVal)rtnVal=false;else{if(po){po.sticknow=1;self.status=(po.exclusive)?po.exclusivestatus:'';rtnVal=po.exclusive;}}
return rtnVal;}
function clearExclusive(){po.exclusive=0;}
function setExclusive(){po.exclusive=(po.showingsticky&&po.exclusive);}
function chkForExclusive(){if(cOverrideIsSet)po.exclusive=0;return true;}
registerRunTimeFunction(setExclusiveVariables);registerCmdLineFunction(parseExclusiveExtras);registerPostParseFunction(chkForExclusive);registerHook("ctCreatePopup",setExclusive,FBEFORE);registerHook("hideObject",clearExclusive,FAFTER);if(cInfo.meets(1.00))registerNoParameterCommands('exclusive');}
if(typeof window.jQuery=="undefined"){window.undefined=window.undefined;var jQuery=function(a,c){if(window==this||!this.init)
return new jQuery(a,c);return this.init(a,c);};if(typeof $!="undefined")
jQuery._$=$;var $=jQuery;jQuery.fn=jQuery.prototype={init:function(a,c){a=a||document;if(jQuery.isFunction(a))
return new jQuery(document)[jQuery.fn.ready?"ready":"load"](a);if(typeof a=="string"){var m=/^[^<]*(<(.|\s)+>)[^>]*$/.exec(a);if(m)
a=jQuery.clean([m[1]]);else
return new jQuery(c).find(a);}
return this.setArray(a.constructor==Array&&a||(a.jquery||a.length&&a!=window&&!a.nodeType&&a[0]!=undefined&&a[0].nodeType)&&jQuery.makeArray(a)||[a]);},jquery:"1.1.3.1",size:function(){return this.length;},length:0,get:function(num){return num==undefined?jQuery.makeArray(this):this[num];},pushStack:function(a){var ret=jQuery(a);ret.prevObject=this;return ret;},setArray:function(a){this.length=0;[].push.apply(this,a);return this;},each:function(fn,args){return jQuery.each(this,fn,args);},index:function(obj){var pos=-1;this.each(function(i){if(this==obj)pos=i;});return pos;},attr:function(key,value,type){var obj=key;if(key.constructor==String)
if(value==undefined)
return this.length&&jQuery[type||"attr"](this[0],key)||undefined;else{obj={};obj[key]=value;}
return this.each(function(index){for(var prop in obj)
jQuery.attr(type?this.style:this,prop,jQuery.prop(this,obj[prop],type,index,prop));});},css:function(key,value){return this.attr(key,value,"curCSS");},text:function(e){if(typeof e=="string")
return this.empty().append(document.createTextNode(e));var t="";jQuery.each(e||this,function(){jQuery.each(this.childNodes,function(){if(this.nodeType!=8)
t+=this.nodeType!=1?this.nodeValue:jQuery.fn.text([this]);});});return t;},wrap:function(){var a,args=arguments;return this.each(function(){if(!a)
a=jQuery.clean(args,this.ownerDocument);var b=a[0].cloneNode(true);this.parentNode.insertBefore(b,this);while(b.firstChild)
b=b.firstChild;b.appendChild(this);});},append:function(){return this.domManip(arguments,true,1,function(a){this.appendChild(a);});},prepend:function(){return this.domManip(arguments,true,-1,function(a){this.insertBefore(a,this.firstChild);});},before:function(){return this.domManip(arguments,false,1,function(a){this.parentNode.insertBefore(a,this);});},after:function(){return this.domManip(arguments,false,-1,function(a){this.parentNode.insertBefore(a,this.nextSibling);});},end:function(){return this.prevObject||jQuery([]);},find:function(t){var data=jQuery.map(this,function(a){return jQuery.find(t,a);});return this.pushStack(/[^+>] [^+>]/.test(t)||t.indexOf("..")>-1?jQuery.unique(data):data);},clone:function(deep){var $this=this.add(this.find("*"));$this.each(function(){this._$events={};for(var type in this.$events)
this._$events[type]=jQuery.extend({},this.$events[type]);}).unbind();var r=this.pushStack(jQuery.map(this,function(a){return a.cloneNode(deep!=undefined?deep:true);}));$this.each(function(){var events=this._$events;for(var type in events)
for(var handler in events[type])
jQuery.event.add(this,type,events[type][handler],events[type][handler].data);this._$events=null;});return r;},filter:function(t){return this.pushStack(jQuery.isFunction(t)&&jQuery.grep(this,function(el,index){return t.apply(el,[index])})||jQuery.multiFilter(t,this));},not:function(t){return this.pushStack(t.constructor==String&&jQuery.multiFilter(t,this,true)||jQuery.grep(this,function(a){return(t.constructor==Array||t.jquery)?jQuery.inArray(a,t)<0:a!=t;}));},add:function(t){return this.pushStack(jQuery.merge(this.get(),t.constructor==String?jQuery(t).get():t.length!=undefined&&(!t.nodeName||t.nodeName=="FORM")?t:[t]));},is:function(expr){return expr?jQuery.multiFilter(expr,this).length>0:false;},val:function(val){return val==undefined?(this.length?this[0].value:null):this.attr("value",val);},html:function(val){return val==undefined?(this.length?this[0].innerHTML:null):this.empty().append(val);},domManip:function(args,table,dir,fn){var clone=this.length>1,a;return this.each(function(){if(!a){a=jQuery.clean(args,this.ownerDocument);if(dir<0)
a.reverse();}
var obj=this;if(table&&jQuery.nodeName(this,"table")&&jQuery.nodeName(a[0],"tr"))
obj=this.getElementsByTagName("tbody")[0]||this.appendChild(document.createElement("tbody"));jQuery.each(a,function(){fn.apply(obj,[clone?this.cloneNode(true):this]);});});}};jQuery.extend=jQuery.fn.extend=function(){var target=arguments[0],a=1;if(arguments.length==1){target=this;a=0;}
var prop;while((prop=arguments[a++])!=null)
for(var i in prop)target[i]=prop[i];return target;};jQuery.extend({noConflict:function(){if(jQuery._$)
$=jQuery._$;return jQuery;},isFunction:function(fn){return!!fn&&typeof fn!="string"&&!fn.nodeName&&fn.constructor!=Array&&/function/i.test(fn+"");},isXMLDoc:function(elem){return elem.tagName&&elem.ownerDocument&&!elem.ownerDocument.body;},nodeName:function(elem,name){return elem.nodeName&&elem.nodeName.toUpperCase()==name.toUpperCase();},each:function(obj,fn,args){if(obj.length==undefined)
for(var i in obj)
fn.apply(obj[i],args||[i,obj[i]]);else
for(var i=0,ol=obj.length;i<ol;i++)
if(fn.apply(obj[i],args||[i,obj[i]])===false)break;return obj;},prop:function(elem,value,type,index,prop){if(jQuery.isFunction(value))
value=value.call(elem,[index]);var exclude=/z-?index|font-?weight|opacity|zoom|line-?height/i;return value&&value.constructor==Number&&type=="curCSS"&&!exclude.test(prop)?value+"px":value;},className:{add:function(elem,c){jQuery.each(c.split(/\s+/),function(i,cur){if(!jQuery.className.has(elem.className,cur))
elem.className+=(elem.className?" ":"")+cur;});},remove:function(elem,c){elem.className=c!=undefined?jQuery.grep(elem.className.split(/\s+/),function(cur){return!jQuery.className.has(c,cur);}).join(" "):"";},has:function(t,c){return jQuery.inArray(c,(t.className||t).toString().split(/\s+/))>-1;}},swap:function(e,o,f){for(var i in o){e.style["old"+i]=e.style[i];e.style[i]=o[i];}
f.apply(e,[]);for(var i in o)
e.style[i]=e.style["old"+i];},css:function(e,p){if(p=="height"||p=="width"){var old={},oHeight,oWidth,d=["Top","Bottom","Right","Left"];jQuery.each(d,function(){old["padding"+this]=0;old["border"+this+"Width"]=0;});jQuery.swap(e,old,function(){if(jQuery(e).is(':visible')){oHeight=e.offsetHeight;oWidth=e.offsetWidth;}else{e=jQuery(e.cloneNode(true)).find(":radio").removeAttr("checked").end().css({visibility:"hidden",position:"absolute",display:"block",right:"0",left:"0"}).appendTo(e.parentNode)[0];var parPos=jQuery.css(e.parentNode,"position")||"static";if(parPos=="static")
e.parentNode.style.position="relative";oHeight=e.clientHeight;oWidth=e.clientWidth;if(parPos=="static")
e.parentNode.style.position="static";e.parentNode.removeChild(e);}});return p=="height"?oHeight:oWidth;}
return jQuery.curCSS(e,p);},curCSS:function(elem,prop,force){var ret;if(prop=="opacity"&&jQuery.browser.msie){ret=jQuery.attr(elem.style,"opacity");return ret==""?"1":ret;}
if(prop.match(/float/i))
prop=jQuery.styleFloat;if(!force&&elem.style[prop])
ret=elem.style[prop];else if(document.defaultView&&document.defaultView.getComputedStyle){if(prop.match(/float/i))
prop="float";prop=prop.replace(/([A-Z])/g,"-$1").toLowerCase();var cur=document.defaultView.getComputedStyle(elem,null);if(cur)
ret=cur.getPropertyValue(prop);else if(prop=="display")
ret="none";else
jQuery.swap(elem,{display:"block"},function(){var c=document.defaultView.getComputedStyle(this,"");ret=c&&c.getPropertyValue(prop)||"";});}else if(elem.currentStyle){var newProp=prop.replace(/\-(\w)/g,function(m,c){return c.toUpperCase();});ret=elem.currentStyle[prop]||elem.currentStyle[newProp];}
return ret;},clean:function(a,doc){var r=[];doc=doc||document;jQuery.each(a,function(i,arg){if(!arg)return;if(arg.constructor==Number)
arg=arg.toString();if(typeof arg=="string"){var s=jQuery.trim(arg).toLowerCase(),div=doc.createElement("div"),tb=[];var wrap=!s.indexOf("<opt")&&[1,"<select>","</select>"]||!s.indexOf("<leg")&&[1,"<fieldset>","</fieldset>"]||(!s.indexOf("<thead")||!s.indexOf("<tbody")||!s.indexOf("<tfoot")||!s.indexOf("<colg"))&&[1,"<table>","</table>"]||!s.indexOf("<tr")&&[2,"<table><tbody>","</tbody></table>"]||(!s.indexOf("<td")||!s.indexOf("<th"))&&[3,"<table><tbody><tr>","</tr></tbody></table>"]||!s.indexOf("<col")&&[2,"<table><colgroup>","</colgroup></table>"]||[0,"",""];div.innerHTML=wrap[1]+arg+wrap[2];while(wrap[0]--)
div=div.firstChild;if(jQuery.browser.msie){if(!s.indexOf("<table")&&s.indexOf("<tbody")<0)
tb=div.firstChild&&div.firstChild.childNodes;else if(wrap[1]=="<table>"&&s.indexOf("<tbody")<0)
tb=div.childNodes;for(var n=tb.length-1;n>=0;--n)
if(jQuery.nodeName(tb[n],"tbody")&&!tb[n].childNodes.length)
tb[n].parentNode.removeChild(tb[n]);}
arg=jQuery.makeArray(div.childNodes);}
if(0===arg.length&&(!jQuery.nodeName(arg,"form")&&!jQuery.nodeName(arg,"select")))
return;if(arg[0]==undefined||jQuery.nodeName(arg,"form")||arg.options)
r.push(arg);else
r=jQuery.merge(r,arg);});return r;},attr:function(elem,name,value){var fix=jQuery.isXMLDoc(elem)?{}:jQuery.props;if(fix[name]){if(value!=undefined)elem[fix[name]]=value;return elem[fix[name]];}else if(value==undefined&&jQuery.browser.msie&&jQuery.nodeName(elem,"form")&&(name=="action"||name=="method"))
return elem.getAttributeNode(name).nodeValue;else if(elem.tagName){if(value!=undefined)elem.setAttribute(name,value);if(jQuery.browser.msie&&/href|src/.test(name)&&!jQuery.isXMLDoc(elem))
return elem.getAttribute(name,2);return elem.getAttribute(name);}else{if(name=="opacity"&&jQuery.browser.msie){if(value!=undefined){elem.zoom=1;elem.filter=(elem.filter||"").replace(/alpha\([^)]*\)/,"")+
(parseFloat(value).toString()=="NaN"?"":"alpha(opacity="+value*100+")");}
return elem.filter?(parseFloat(elem.filter.match(/opacity=([^)]*)/)[1])/100).toString():"";}
name=name.replace(/-([a-z])/ig,function(z,b){return b.toUpperCase();});if(value!=undefined)elem[name]=value;return elem[name];}},trim:function(t){return t.replace(/^\s+|\s+$/g,"");},makeArray:function(a){var r=[];if(typeof a!="array")
for(var i=0,al=a.length;i<al;i++)
r.push(a[i]);else
r=a.slice(0);return r;},inArray:function(b,a){for(var i=0,al=a.length;i<al;i++)
if(a[i]==b)
return i;return-1;},merge:function(first,second){for(var i=0;second[i];i++)
first.push(second[i]);return first;},unique:function(first){var r=[],num=jQuery.mergeNum++;for(var i=0,fl=first.length;i<fl;i++)
if(num!=first[i].mergeNum){first[i].mergeNum=num;r.push(first[i]);}
return r;},mergeNum:0,grep:function(elems,fn,inv){if(typeof fn=="string")
fn=new Function("a","i","return "+fn);var result=[];for(var i=0,el=elems.length;i<el;i++)
if(!inv&&fn(elems[i],i)||inv&&!fn(elems[i],i))
result.push(elems[i]);return result;},map:function(elems,fn){if(typeof fn=="string")
fn=new Function("a","return "+fn);var result=[];for(var i=0,el=elems.length;i<el;i++){var val=fn(elems[i],i);if(val!==null&&val!=undefined){if(val.constructor!=Array)val=[val];result=result.concat(val);}}
return result;}});new function(){var b=navigator.userAgent.toLowerCase();jQuery.browser={version:(b.match(/.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/)||[])[1],safari:/webkit/.test(b),opera:/opera/.test(b),msie:/msie/.test(b)&&!/opera/.test(b),mozilla:/mozilla/.test(b)&&!/(compatible|webkit)/.test(b)};jQuery.boxModel=!jQuery.browser.msie||document.compatMode=="CSS1Compat";jQuery.styleFloat=jQuery.browser.msie?"styleFloat":"cssFloat",jQuery.props={"for":"htmlFor","class":"className","float":jQuery.styleFloat,cssFloat:jQuery.styleFloat,styleFloat:jQuery.styleFloat,innerHTML:"innerHTML",className:"className",value:"value",disabled:"disabled",checked:"checked",readonly:"readOnly",selected:"selected",maxlength:"maxLength"};};jQuery.each({parent:"a.parentNode",parents:"jQuery.parents(a)",next:"jQuery.nth(a,2,'nextSibling')",prev:"jQuery.nth(a,2,'previousSibling')",siblings:"jQuery.sibling(a.parentNode.firstChild,a)",children:"jQuery.sibling(a.firstChild)"},function(i,n){jQuery.fn[i]=function(a){var ret=jQuery.map(this,n);if(a&&typeof a=="string")
ret=jQuery.multiFilter(a,ret);return this.pushStack(ret);};});jQuery.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after"},function(i,n){jQuery.fn[i]=function(){var a=arguments;return this.each(function(){for(var j=0,al=a.length;j<al;j++)
jQuery(a[j])[n](this);});};});jQuery.each({removeAttr:function(key){jQuery.attr(this,key,"");this.removeAttribute(key);},addClass:function(c){jQuery.className.add(this,c);},removeClass:function(c){jQuery.className.remove(this,c);},toggleClass:function(c){jQuery.className[jQuery.className.has(this,c)?"remove":"add"](this,c);},remove:function(a){if(!a||jQuery.filter(a,[this]).r.length)
this.parentNode.removeChild(this);},empty:function(){while(this.firstChild)
this.removeChild(this.firstChild);}},function(i,n){jQuery.fn[i]=function(){return this.each(n,arguments);};});jQuery.each(["eq","lt","gt","contains"],function(i,n){jQuery.fn[n]=function(num,fn){return this.filter(":"+n+"("+num+")",fn);};});jQuery.each(["height","width"],function(i,n){jQuery.fn[n]=function(h){return h==undefined?(this.length?jQuery.css(this[0],n):null):this.css(n,h.constructor==String?h:h+"px");};});jQuery.extend({expr:{"":"m[2]=='*'||jQuery.nodeName(a,m[2])","#":"a.getAttribute('id')==m[2]",":":{lt:"i<m[3]-0",gt:"i>m[3]-0",nth:"m[3]-0==i",eq:"m[3]-0==i",first:"i==0",last:"i==r.length-1",even:"i%2==0",odd:"i%2","first-child":"a.parentNode.getElementsByTagName('*')[0]==a","last-child":"jQuery.nth(a.parentNode.lastChild,1,'previousSibling')==a","only-child":"!jQuery.nth(a.parentNode.lastChild,2,'previousSibling')",parent:"a.firstChild",empty:"!a.firstChild",contains:"(a.textContent||a.innerText||'').indexOf(m[3])>=0",visible:'"hidden"!=a.type&&jQuery.css(a,"display")!="none"&&jQuery.css(a,"visibility")!="hidden"',hidden:'"hidden"==a.type||jQuery.css(a,"display")=="none"||jQuery.css(a,"visibility")=="hidden"',enabled:"!a.disabled",disabled:"a.disabled",checked:"a.checked",selected:"a.selected||jQuery.attr(a,'selected')",text:"'text'==a.type",radio:"'radio'==a.type",checkbox:"'checkbox'==a.type",file:"'file'==a.type",password:"'password'==a.type",submit:"'submit'==a.type",image:"'image'==a.type",reset:"'reset'==a.type",button:'"button"==a.type||jQuery.nodeName(a,"button")',input:"/input|select|textarea|button/i.test(a.nodeName)"},"[":"jQuery.find(m[2],a).length"},parse:[/^\[ *(@)([\w-]+) *([!*$^~=]*) *('?"?)(.*?)\4 *\]/,/^(\[)\s*(.*?(\[.*?\])?[^[]*?)\s*\]/,/^(:)([\w-]+)\("?'?(.*?(\(.*?\))?[^(]*?)"?'?\)/,new RegExp("^([:.#]*)("+
(jQuery.chars=jQuery.browser.safari&&jQuery.browser.version<"3.0.0"?"\\w":"(?:[\\w\u0128-\uFFFF*_-]|\\\\.)")+"+)")],multiFilter:function(expr,elems,not){var old,cur=[];while(expr&&expr!=old){old=expr;var f=jQuery.filter(expr,elems,not);expr=f.t.replace(/^\s*,\s*/,"");cur=not?elems=f.r:jQuery.merge(cur,f.r);}
return cur;},find:function(t,context){if(typeof t!="string")
return[t];if(context&&!context.nodeType)
context=null;context=context||document;if(!t.indexOf("//")){context=context.documentElement;t=t.substr(2,t.length);}else if(!t.indexOf("/")&&!context.ownerDocument){context=context.documentElement;t=t.substr(1,t.length);if(t.indexOf("/")>=1)
t=t.substr(t.indexOf("/"),t.length);}
var ret=[context],done=[],last;while(t&&last!=t){var r=[];last=t;t=jQuery.trim(t).replace(/^\/\//,"");var foundToken=false;var re=new RegExp("^[/>]\\s*("+jQuery.chars+"+)");var m=re.exec(t);if(m){var nodeName=m[1].toUpperCase();for(var i=0;ret[i];i++)
for(var c=ret[i].firstChild;c;c=c.nextSibling)
if(c.nodeType==1&&(nodeName=="*"||c.nodeName.toUpperCase()==nodeName.toUpperCase()))
r.push(c);ret=r;t=t.replace(re,"");if(t.indexOf(" ")==0)continue;foundToken=true;}else{re=/^((\/?\.\.)|([>\/+~]))\s*([a-z]*)/i;if((m=re.exec(t))!=null){r=[];var nodeName=m[4],mergeNum=jQuery.mergeNum++;m=m[1];for(var j=0,rl=ret.length;j<rl;j++)
if(m.indexOf("..")<0){var n=m=="~"||m=="+"?ret[j].nextSibling:ret[j].firstChild;for(;n;n=n.nextSibling)
if(n.nodeType==1){if(m=="~"&&n.mergeNum==mergeNum)break;if(!nodeName||n.nodeName.toUpperCase()==nodeName.toUpperCase()){if(m=="~")n.mergeNum=mergeNum;r.push(n);}
if(m=="+")break;}}else
r.push(ret[j].parentNode);ret=r;t=jQuery.trim(t.replace(re,""));foundToken=true;}}
if(t&&!foundToken){if(!t.indexOf(",")){if(context==ret[0])ret.shift();done=jQuery.merge(done,ret);r=ret=[context];t=" "+t.substr(1,t.length);}else{var re2=new RegExp("^("+jQuery.chars+"+)(#)("+jQuery.chars+"+)");var m=re2.exec(t);if(m){m=[0,m[2],m[3],m[1]];}else{re2=new RegExp("^([#.]?)("+jQuery.chars+"*)");m=re2.exec(t);}
m[2]=m[2].replace(/\\/g,"");var elem=ret[ret.length-1];if(m[1]=="#"&&elem&&elem.getElementById){var oid=elem.getElementById(m[2]);if((jQuery.browser.msie||jQuery.browser.opera)&&oid&&typeof oid.id=="string"&&oid.id!=m[2])
oid=jQuery('[@id="'+m[2]+'"]',elem)[0];ret=r=oid&&(!m[3]||jQuery.nodeName(oid,m[3]))?[oid]:[];}else{for(var i=0;ret[i];i++){var tag=m[1]!=""||m[0]==""?"*":m[2];if(tag=="*"&&ret[i].nodeName.toLowerCase()=="object")
tag="param";r=jQuery.merge(r,ret[i].getElementsByTagName(tag));}
if(m[1]==".")
r=jQuery.classFilter(r,m[2]);if(m[1]=="#"){var tmp=[];for(var i=0;r[i];i++)
if(r[i].getAttribute("id")==m[2]){tmp=[r[i]];break;}
r=tmp;}
ret=r;}
t=t.replace(re2,"");}}
if(t){var val=jQuery.filter(t,r);ret=r=val.r;t=jQuery.trim(val.t);}}
if(t)
ret=[];if(ret&&context==ret[0])
ret.shift();done=jQuery.merge(done,ret);return done;},classFilter:function(r,m,not){m=" "+m+" ";var tmp=[];for(var i=0;r[i];i++){var pass=(" "+r[i].className+" ").indexOf(m)>=0;if(!not&&pass||not&&!pass)
tmp.push(r[i]);}
return tmp;},filter:function(t,r,not){var last;while(t&&t!=last){last=t;var p=jQuery.parse,m;for(var i=0;p[i];i++){m=p[i].exec(t);if(m){t=t.substring(m[0].length);m[2]=m[2].replace(/\\/g,"");break;}}
if(!m)
break;if(m[1]==":"&&m[2]=="not")
r=jQuery.filter(m[3],r,true).r;else if(m[1]==".")
r=jQuery.classFilter(r,m[2],not);else if(m[1]=="@"){var tmp=[],type=m[3];for(var i=0,rl=r.length;i<rl;i++){var a=r[i],z=a[jQuery.props[m[2]]||m[2]];if(z==null||/href|src/.test(m[2]))
z=jQuery.attr(a,m[2])||'';if((type==""&&!!z||type=="="&&z==m[5]||type=="!="&&z!=m[5]||type=="^="&&z&&!z.indexOf(m[5])||type=="$="&&z.substr(z.length-m[5].length)==m[5]||(type=="*="||type=="~=")&&z.indexOf(m[5])>=0)^not)
tmp.push(a);}
r=tmp;}else if(m[1]==":"&&m[2]=="nth-child"){var num=jQuery.mergeNum++,tmp=[],test=/(\d*)n\+?(\d*)/.exec(m[3]=="even"&&"2n"||m[3]=="odd"&&"2n+1"||!/\D/.test(m[3])&&"n+"+m[3]||m[3]),first=(test[1]||1)-0,last=test[2]-0;for(var i=0,rl=r.length;i<rl;i++){var node=r[i],parentNode=node.parentNode;if(num!=parentNode.mergeNum){var c=1;for(var n=parentNode.firstChild;n;n=n.nextSibling)
if(n.nodeType==1)
n.nodeIndex=c++;parentNode.mergeNum=num;}
var add=false;if(first==1){if(last==0||node.nodeIndex==last)
add=true;}else if((node.nodeIndex+last)%first==0)
add=true;if(add^not)
tmp.push(node);}
r=tmp;}else{var f=jQuery.expr[m[1]];if(typeof f!="string")
f=jQuery.expr[m[1]][m[2]];eval("f = function(a,i){return "+f+"}");r=jQuery.grep(r,f,not);}}
return{r:r,t:t};},parents:function(elem){var matched=[];var cur=elem.parentNode;while(cur&&cur!=document){matched.push(cur);cur=cur.parentNode;}
return matched;},nth:function(cur,result,dir,elem){result=result||1;var num=0;for(;cur;cur=cur[dir])
if(cur.nodeType==1&&++num==result)
break;return cur;},sibling:function(n,elem){var r=[];for(;n;n=n.nextSibling){if(n.nodeType==1&&(!elem||n!=elem))
r.push(n);}
return r;}});jQuery.event={add:function(element,type,handler,data){if(jQuery.browser.msie&&element.setInterval!=undefined)
element=window;if(!handler.guid)
handler.guid=this.guid++;if(data!=undefined){var fn=handler;handler=function(){return fn.apply(this,arguments);};handler.data=data;handler.guid=fn.guid;}
if(!element.$events)
element.$events={};if(!element.$handle)
element.$handle=function(){var val;if(typeof jQuery=="undefined"||jQuery.event.triggered)
return val;val=jQuery.event.handle.apply(element,arguments);return val;};var handlers=element.$events[type];if(!handlers){handlers=element.$events[type]={};if(element.addEventListener)
element.addEventListener(type,element.$handle,false);else
element.attachEvent("on"+type,element.$handle);}
handlers[handler.guid]=handler;if(!this.global[type])
this.global[type]=[];if(jQuery.inArray(element,this.global[type])==-1)
this.global[type].push(element);},guid:1,global:{},remove:function(element,type,handler){var events=element.$events,ret,index;if(events){if(type&&type.type){handler=type.handler;type=type.type;}
if(!type){for(type in events)
this.remove(element,type);}else if(events[type]){if(handler)
delete events[type][handler.guid];else
for(handler in element.$events[type])
delete events[type][handler];for(ret in events[type])break;if(!ret){if(element.removeEventListener)
element.removeEventListener(type,element.$handle,false);else
element.detachEvent("on"+type,element.$handle);ret=null;delete events[type];while(this.global[type]&&((index=jQuery.inArray(element,this.global[type]))>=0))
delete this.global[type][index];}}
for(ret in events)break;if(!ret)
element.$handle=element.$events=null;}},trigger:function(type,data,element){data=jQuery.makeArray(data||[]);if(!element)
jQuery.each(this.global[type]||[],function(){jQuery.event.trigger(type,data,this);});else{var val,ret,fn=jQuery.isFunction(element[type]||null);data.unshift(this.fix({type:type,target:element}));if(jQuery.isFunction(element.$handle)&&(val=element.$handle.apply(element,data))!==false)
this.triggered=true;if(fn&&val!==false&&!jQuery.nodeName(element,'a'))
element[type]();this.triggered=false;}},handle:function(event){var val;event=jQuery.event.fix(event||window.event||{});var c=this.$events&&this.$events[event.type],args=[].slice.call(arguments,1);args.unshift(event);for(var j in c){args[0].handler=c[j];args[0].data=c[j].data;if(c[j].apply(this,args)===false){event.preventDefault();event.stopPropagation();val=false;}}
if(jQuery.browser.msie)
event.target=event.preventDefault=event.stopPropagation=event.handler=event.data=null;return val;},fix:function(event){var originalEvent=event;event=jQuery.extend({},originalEvent);event.preventDefault=function(){if(originalEvent.preventDefault)
return originalEvent.preventDefault();originalEvent.returnValue=false;};event.stopPropagation=function(){if(originalEvent.stopPropagation)
return originalEvent.stopPropagation();originalEvent.cancelBubble=true;};if(!event.target&&event.srcElement)
event.target=event.srcElement;if(jQuery.browser.safari&&event.target.nodeType==3)
event.target=originalEvent.target.parentNode;if(!event.relatedTarget&&event.fromElement)
event.relatedTarget=event.fromElement==event.target?event.toElement:event.fromElement;if(event.pageX==null&&event.clientX!=null){var e=document.documentElement,b=document.body;event.pageX=event.clientX+(e&&e.scrollLeft||b.scrollLeft);event.pageY=event.clientY+(e&&e.scrollTop||b.scrollTop);}
if(!event.which&&(event.charCode||event.keyCode))
event.which=event.charCode||event.keyCode;if(!event.metaKey&&event.ctrlKey)
event.metaKey=event.ctrlKey;if(!event.which&&event.button)
event.which=(event.button&1?1:(event.button&2?3:(event.button&4?2:0)));return event;}};jQuery.fn.extend({bind:function(type,data,fn){return type=="unload"?this.one(type,data,fn):this.each(function(){jQuery.event.add(this,type,fn||data,fn&&data);});},one:function(type,data,fn){return this.each(function(){jQuery.event.add(this,type,function(event){jQuery(this).unbind(event);return(fn||data).apply(this,arguments);},fn&&data);});},unbind:function(type,fn){return this.each(function(){jQuery.event.remove(this,type,fn);});},trigger:function(type,data){return this.each(function(){jQuery.event.trigger(type,data,this);});},toggle:function(){var a=arguments;return this.click(function(e){this.lastToggle=0==this.lastToggle?1:0;e.preventDefault();return a[this.lastToggle].apply(this,[e])||false;});},hover:function(f,g){function handleHover(e){var p=e.relatedTarget;while(p&&p!=this)try{p=p.parentNode}catch(e){p=this;};if(p==this)return false;return(e.type=="mouseover"?f:g).apply(this,[e]);}
return this.mouseover(handleHover).mouseout(handleHover);},ready:function(f){if(jQuery.isReady)
f.apply(document,[jQuery]);else
jQuery.readyList.push(function(){return f.apply(this,[jQuery])});return this;}});jQuery.extend({isReady:false,readyList:[],ready:function(){if(!jQuery.isReady){jQuery.isReady=true;if(jQuery.readyList){jQuery.each(jQuery.readyList,function(){this.apply(document);});jQuery.readyList=null;}
if(jQuery.browser.mozilla||jQuery.browser.opera)
document.removeEventListener("DOMContentLoaded",jQuery.ready,false);if(!window.frames.length)
jQuery(window).load(function(){jQuery("#__ie_init").remove();});}}});new function(){jQuery.each(("blur,focus,load,resize,scroll,unload,click,dblclick,"+"mousedown,mouseup,mousemove,mouseover,mouseout,change,select,"+"submit,keydown,keypress,keyup,error").split(","),function(i,o){jQuery.fn[o]=function(f){return f?this.bind(o,f):this.trigger(o);};});if(jQuery.browser.mozilla||jQuery.browser.opera)
document.addEventListener("DOMContentLoaded",jQuery.ready,false);else if(jQuery.browser.msie){document.write("<scr"+"ipt id=__ie_init defer=true "+"src=//:><\/script>");var script=document.getElementById("__ie_init");if(script)
script.onreadystatechange=function(){if(this.readyState!="complete")return;jQuery.ready();};script=null;}else if(jQuery.browser.safari)
jQuery.safariTimer=setInterval(function(){if(document.readyState=="loaded"||document.readyState=="complete"){clearInterval(jQuery.safariTimer);jQuery.safariTimer=null;jQuery.ready();}},10);jQuery.event.add(window,"load",jQuery.ready);};if(jQuery.browser.msie)
jQuery(window).one("unload",function(){var global=jQuery.event.global;for(var type in global){var els=global[type],i=els.length;if(i&&type!='unload')
do
els[i-1]&&jQuery.event.remove(els[i-1],type);while(--i);}});jQuery.fn.extend({loadIfModified:function(url,params,callback){this.load(url,params,callback,1);},load:function(url,params,callback,ifModified){if(jQuery.isFunction(url))
return this.bind("load",url);callback=callback||function(){};var type="GET";if(params)
if(jQuery.isFunction(params)){callback=params;params=null;}else{params=jQuery.param(params);type="POST";}
var self=this;jQuery.ajax({url:url,type:type,data:params,ifModified:ifModified,complete:function(res,status){if(status=="success"||!ifModified&&status=="notmodified")
self.attr("innerHTML",res.responseText).evalScripts().each(callback,[res.responseText,status,res]);else
callback.apply(self,[res.responseText,status,res]);}});return this;},serialize:function(){return jQuery.param(this);},evalScripts:function(){return this.find("script").each(function(){if(this.src)
jQuery.getScript(this.src);else
jQuery.globalEval(this.text||this.textContent||this.innerHTML||"");}).end();}});jQuery.each("ajaxStart,ajaxStop,ajaxComplete,ajaxError,ajaxSuccess,ajaxSend".split(","),function(i,o){jQuery.fn[o]=function(f){return this.bind(o,f);};});jQuery.extend({get:function(url,data,callback,type,ifModified){if(jQuery.isFunction(data)){callback=data;data=null;}
return jQuery.ajax({type:"GET",url:url,data:data,success:callback,dataType:type,ifModified:ifModified});},getIfModified:function(url,data,callback,type){return jQuery.get(url,data,callback,type,1);},getScript:function(url,callback){return jQuery.get(url,null,callback,"script");},getJSON:function(url,data,callback){return jQuery.get(url,data,callback,"json");},post:function(url,data,callback,type){if(jQuery.isFunction(data)){callback=data;data={};}
return jQuery.ajax({type:"POST",url:url,data:data,success:callback,dataType:type});},ajaxTimeout:function(timeout){jQuery.ajaxSettings.timeout=timeout;},ajaxSetup:function(settings){jQuery.extend(jQuery.ajaxSettings,settings);},ajaxSettings:{global:true,type:"GET",timeout:0,contentType:"application/x-www-form-urlencoded",processData:true,async:true,data:null},lastModified:{},ajax:function(s){s=jQuery.extend({},jQuery.ajaxSettings,s);if(s.data){if(s.processData&&typeof s.data!="string")
s.data=jQuery.param(s.data);if(s.type.toLowerCase()=="get"){s.url+=((s.url.indexOf("?")>-1)?"&":"?")+s.data;s.data=null;}}
if(s.global&&!jQuery.active++)
jQuery.event.trigger("ajaxStart");var requestDone=false;var xml=window.ActiveXObject?new ActiveXObject("Microsoft.XMLHTTP"):new XMLHttpRequest();xml.open(s.type,s.url,s.async);if(s.data)
xml.setRequestHeader("Content-Type",s.contentType);if(s.ifModified)
xml.setRequestHeader("If-Modified-Since",jQuery.lastModified[s.url]||"Thu, 01 Jan 1970 00:00:00 GMT");xml.setRequestHeader("X-Requested-With","XMLHttpRequest");if(s.beforeSend)
s.beforeSend(xml);if(s.global)
jQuery.event.trigger("ajaxSend",[xml,s]);var onreadystatechange=function(isTimeout){if(xml&&(xml.readyState==4||isTimeout=="timeout")){requestDone=true;if(ival){clearInterval(ival);ival=null;}
var status;try{status=jQuery.httpSuccess(xml)&&isTimeout!="timeout"?s.ifModified&&jQuery.httpNotModified(xml,s.url)?"notmodified":"success":"error";if(status!="error"){var modRes;try{modRes=xml.getResponseHeader("Last-Modified");}catch(e){}
if(s.ifModified&&modRes)
jQuery.lastModified[s.url]=modRes;var data=jQuery.httpData(xml,s.dataType);if(s.success)
s.success(data,status);if(s.global)
jQuery.event.trigger("ajaxSuccess",[xml,s]);}else
jQuery.handleError(s,xml,status);}catch(e){status="error";jQuery.handleError(s,xml,status,e);}
if(s.global)
jQuery.event.trigger("ajaxComplete",[xml,s]);if(s.global&&!--jQuery.active)
jQuery.event.trigger("ajaxStop");if(s.complete)
s.complete(xml,status);if(s.async)
xml=null;}};var ival=setInterval(onreadystatechange,13);if(s.timeout>0)
setTimeout(function(){if(xml){xml.abort();if(!requestDone)
onreadystatechange("timeout");}},s.timeout);try{xml.send(s.data);}catch(e){jQuery.handleError(s,xml,null,e);}
if(!s.async)
onreadystatechange();return xml;},handleError:function(s,xml,status,e){if(s.error)s.error(xml,status,e);if(s.global)
jQuery.event.trigger("ajaxError",[xml,s,e]);},active:0,httpSuccess:function(r){try{return!r.status&&location.protocol=="file:"||(r.status>=200&&r.status<300)||r.status==304||jQuery.browser.safari&&r.status==undefined;}catch(e){}
return false;},httpNotModified:function(xml,url){try{var xmlRes=xml.getResponseHeader("Last-Modified");return xml.status==304||xmlRes==jQuery.lastModified[url]||jQuery.browser.safari&&xml.status==undefined;}catch(e){}
return false;},httpData:function(r,type){var ct=r.getResponseHeader("content-type");var data=!type&&ct&&ct.indexOf("xml")>=0;data=type=="xml"||data?r.responseXML:r.responseText;if(type=="script")
jQuery.globalEval(data);if(type=="json")
data=eval("("+data+")");if(type=="html")
jQuery("<div>").html(data).evalScripts();return data;},param:function(a){var s=[];if(a.constructor==Array||a.jquery)
jQuery.each(a,function(){s.push(encodeURIComponent(this.name)+"="+encodeURIComponent(this.value));});else
for(var j in a)
if(a[j]&&a[j].constructor==Array)
jQuery.each(a[j],function(){s.push(encodeURIComponent(j)+"="+encodeURIComponent(this));});else
s.push(encodeURIComponent(j)+"="+encodeURIComponent(a[j]));return s.join("&");},globalEval:function(data){if(window.execScript)
window.execScript(data);else if(jQuery.browser.safari)
window.setTimeout(data,0);else
eval.call(window,data);}});jQuery.fn.extend({show:function(speed,callback){return speed?this.animate({height:"show",width:"show",opacity:"show"},speed,callback):this.filter(":hidden").each(function(){this.style.display=this.oldblock?this.oldblock:"";if(jQuery.css(this,"display")=="none")
this.style.display="block";}).end();},hide:function(speed,callback){return speed?this.animate({height:"hide",width:"hide",opacity:"hide"},speed,callback):this.filter(":visible").each(function(){this.oldblock=this.oldblock||jQuery.css(this,"display");if(this.oldblock=="none")
this.oldblock="block";this.style.display="none";}).end();},_toggle:jQuery.fn.toggle,toggle:function(fn,fn2){return jQuery.isFunction(fn)&&jQuery.isFunction(fn2)?this._toggle(fn,fn2):fn?this.animate({height:"toggle",width:"toggle",opacity:"toggle"},fn,fn2):this.each(function(){jQuery(this)[jQuery(this).is(":hidden")?"show":"hide"]();});},slideDown:function(speed,callback){return this.animate({height:"show"},speed,callback);},slideUp:function(speed,callback){return this.animate({height:"hide"},speed,callback);},slideToggle:function(speed,callback){return this.animate({height:"toggle"},speed,callback);},fadeIn:function(speed,callback){return this.animate({opacity:"show"},speed,callback);},fadeOut:function(speed,callback){return this.animate({opacity:"hide"},speed,callback);},fadeTo:function(speed,to,callback){return this.animate({opacity:to},speed,callback);},animate:function(prop,speed,easing,callback){return this.queue(function(){var hidden=jQuery(this).is(":hidden"),opt=jQuery.speed(speed,easing,callback),self=this;for(var p in prop){if(prop[p]=="hide"&&hidden||prop[p]=="show"&&!hidden)
return jQuery.isFunction(opt.complete)&&opt.complete.apply(this);if(p=="height"||p=="width"){opt.display=jQuery.css(this,"display");opt.overflow=this.style.overflow;}}
if(opt.overflow!=null)
this.style.overflow="hidden";this.curAnim=jQuery.extend({},prop);jQuery.each(prop,function(name,val){var e=new jQuery.fx(self,opt,name);if(val.constructor==Number)
e.custom(e.cur(),val);else
e[val=="toggle"?hidden?"show":"hide":val](prop);});});},queue:function(type,fn){if(!fn){fn=type;type="fx";}
return this.each(function(){if(!this.queue)
this.queue={};if(!this.queue[type])
this.queue[type]=[];this.queue[type].push(fn);if(this.queue[type].length==1)
fn.apply(this);});}});jQuery.extend({speed:function(speed,easing,fn){var opt=speed&&speed.constructor==Object?speed:{complete:fn||!fn&&easing||jQuery.isFunction(speed)&&speed,duration:speed,easing:fn&&easing||easing&&easing.constructor!=Function&&easing||(jQuery.easing.swing?"swing":"linear")};opt.duration=(opt.duration&&opt.duration.constructor==Number?opt.duration:{slow:600,fast:200}[opt.duration])||400;opt.old=opt.complete;opt.complete=function(){jQuery.dequeue(this,"fx");if(jQuery.isFunction(opt.old))
opt.old.apply(this);};return opt;},easing:{linear:function(p,n,firstNum,diff){return firstNum+diff*p;},swing:function(p,n,firstNum,diff){return((-Math.cos(p*Math.PI)/2)+0.5)*diff+firstNum;}},queue:{},dequeue:function(elem,type){type=type||"fx";if(elem.queue&&elem.queue[type]){elem.queue[type].shift();var f=elem.queue[type][0];if(f)f.apply(elem);}},timers:[],fx:function(elem,options,prop){var z=this;var y=elem.style;z.a=function(){if(options.step)
options.step.apply(elem,[z.now]);if(prop=="opacity")
jQuery.attr(y,"opacity",z.now);else{y[prop]=parseInt(z.now)+"px";y.display="block";}};z.max=function(){return parseFloat(jQuery.css(elem,prop));};z.cur=function(){var r=parseFloat(jQuery.curCSS(elem,prop));return r&&r>-10000?r:z.max();};z.custom=function(from,to){z.startTime=(new Date()).getTime();z.now=from;z.a();jQuery.timers.push(function(){return z.step(from,to);});if(jQuery.timers.length==1){var timer=setInterval(function(){var timers=jQuery.timers;for(var i=0;i<timers.length;i++)
if(!timers[i]())
timers.splice(i--,1);if(!timers.length)
clearInterval(timer);},13);}};z.show=function(){if(!elem.orig)elem.orig={};elem.orig[prop]=jQuery.attr(elem.style,prop);options.show=true;z.custom(0,this.cur());if(prop!="opacity")
y[prop]="1px";jQuery(elem).show();};z.hide=function(){if(!elem.orig)elem.orig={};elem.orig[prop]=jQuery.attr(elem.style,prop);options.hide=true;z.custom(this.cur(),0);};z.step=function(firstNum,lastNum){var t=(new Date()).getTime();if(t>options.duration+z.startTime){z.now=lastNum;z.a();if(elem.curAnim)elem.curAnim[prop]=true;var done=true;for(var i in elem.curAnim)
if(elem.curAnim[i]!==true)
done=false;if(done){if(options.display!=null){y.overflow=options.overflow;y.display=options.display;if(jQuery.css(elem,"display")=="none")
y.display="block";}
if(options.hide)
y.display="none";if(options.hide||options.show)
for(var p in elem.curAnim)
jQuery.attr(y,p,elem.orig[p]);}
if(done&&jQuery.isFunction(options.complete))
options.complete.apply(elem);return false;}else{var n=t-this.startTime;var p=n/options.duration;z.now=jQuery.easing[options.easing](p,n,firstNum,(lastNum-firstNum),options.duration);z.a();}
return true;};}});}
function change_per_page(num) {
setcookie('per_page',num);
setcookie('per_page',num);
bparam('page=1');
}
