
if(typeof deconcept=="undefined"){var deconcept=new Object();}if(typeof deconcept.util=="undefined"){deconcept.util=new Object();}if(typeof deconcept.SWFObjectUtil=="undefined"){deconcept.SWFObjectUtil=new Object();}deconcept.SWFObject=function(_1,id,w,h,_5,c,_7,_8,_9,_a){if(!document.getElementById){return;}this.DETECT_KEY=_a?_a:"detectflash";this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);this.params=new Object();this.variables=new Object();this.attributes=new Array();if(_1){this.setAttribute("swf",_1);}if(id){this.setAttribute("id",id);}if(w){this.setAttribute("width",w);}if(h){this.setAttribute("height",h);}if(_5){this.setAttribute("version",new deconcept.PlayerVersion(_5.toString().split(".")));}this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion();if(!window.opera&&document.all&&this.installedVer.major>7){deconcept.SWFObject.doPrepUnload=true;}if(c){this.addParam("bgcolor",c);}var q=_7?_7:"high";this.addParam("quality",q);this.setAttribute("useExpressInstall",false);this.setAttribute("doExpressInstall",false);var _c=(_8)?_8:window.location;this.setAttribute("xiRedirectUrl",_c);this.setAttribute("redirectUrl","");if(_9){this.setAttribute("redirectUrl",_9);}};deconcept.SWFObject.prototype={useExpressInstall:function(_d){this.xiSWFPath=!_d?"expressinstall.swf":_d;this.setAttribute("useExpressInstall",true);},setAttribute:function(_e,_f){this.attributes[_e]=_f;},getAttribute:function(_10){return this.attributes[_10];},addParam:function(_11,_12){this.params[_11]=_12;},getParams:function(){return this.params;},addVariable:function(_13,_14){this.variables[_13]=_14;},getVariable:function(_15){return this.variables[_15];},getVariables:function(){return this.variables;},getVariablePairs:function(){var _16=new Array();var key;var _18=this.getVariables();for(key in _18){_16[_16.length]=key+"="+_18[key];}return _16;},getSWFHTML:function(){var _19="";if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","PlugIn");this.setAttribute("swf",this.xiSWFPath);}_19="<embed type=\"application/x-shockwave-flash\" src=\""+this.getAttribute("swf")+"\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\" style=\""+this.getAttribute("style")+"\"";_19+=" id=\""+this.getAttribute("id")+"\" name=\""+this.getAttribute("id")+"\" ";var _1a=this.getParams();for(var key in _1a){_19+=[key]+"=\""+_1a[key]+"\" ";}var _1c=this.getVariablePairs().join("&");if(_1c.length>0){_19+="flashvars=\""+_1c+"\"";}_19+="/>";}else{if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");this.setAttribute("swf",this.xiSWFPath);}_19="<object id=\""+this.getAttribute("id")+"\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\" style=\""+this.getAttribute("style")+"\">";_19+="<param name=\"movie\" value=\""+this.getAttribute("swf")+"\" />";var _1d=this.getParams();for(var key in _1d){_19+="<param name=\""+key+"\" value=\""+_1d[key]+"\" />";}var _1f=this.getVariablePairs().join("&");if(_1f.length>0){_19+="<param name=\"flashvars\" value=\""+_1f+"\" />";}_19+="</object>";}return _19;},write:function(_20){if(this.getAttribute("useExpressInstall")){var _21=new deconcept.PlayerVersion([6,0,65]);if(this.installedVer.versionIsValid(_21)&&!this.installedVer.versionIsValid(this.getAttribute("version"))){this.setAttribute("doExpressInstall",true);this.addVariable("MMredirectURL",escape(this.getAttribute("xiRedirectUrl")));document.title=document.title.slice(0,47)+" - Flash Player Installation";this.addVariable("MMdoctitle",document.title);}}if(this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))){var n=(typeof _20=="string")?document.getElementById(_20):_20;n.innerHTML=this.getSWFHTML();return true;}else{if(this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"));}}return false;}};deconcept.SWFObjectUtil.getPlayerVersion=function(){var _23=new deconcept.PlayerVersion([0,0,0]);if(navigator.plugins&&navigator.mimeTypes.length){var x=navigator.plugins["Shockwave Flash"];if(x&&x.description){_23=new deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."));}}else{if(navigator.userAgent&&navigator.userAgent.indexOf("Windows CE")>=0){var axo=1;var _26=3;while(axo){try{_26++;axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+_26);_23=new deconcept.PlayerVersion([_26,0,0]);}catch(e){axo=null;}}}else{try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");}catch(e){try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");_23=new deconcept.PlayerVersion([6,0,21]);axo.AllowScriptAccess="always";}catch(e){if(_23.major==6){return _23;}}try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");}catch(e){}}if(axo!=null){_23=new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));}}}return _23;};deconcept.PlayerVersion=function(_29){this.major=_29[0]!=null?parseInt(_29[0]):0;this.minor=_29[1]!=null?parseInt(_29[1]):0;this.rev=_29[2]!=null?parseInt(_29[2]):0;};deconcept.PlayerVersion.prototype.versionIsValid=function(fv){if(this.major<fv.major){return false;}if(this.major>fv.major){return true;}if(this.minor<fv.minor){return false;}if(this.minor>fv.minor){return true;}if(this.rev<fv.rev){return false;}return true;};deconcept.util={getRequestParameter:function(_2b){var q=document.location.search||document.location.hash;if(_2b==null){return q;}if(q){var _2d=q.substring(1).split("&");for(var i=0;i<_2d.length;i++){if(_2d[i].substring(0,_2d[i].indexOf("="))==_2b){return _2d[i].substring((_2d[i].indexOf("=")+1));}}}return"";}};deconcept.SWFObjectUtil.cleanupSWFs=function(){var _2f=document.getElementsByTagName("OBJECT");for(var i=_2f.length-1;i>=0;i--){_2f[i].style.display="none";for(var x in _2f[i]){if(typeof _2f[i][x]=="function"){_2f[i][x]=function(){};}}}};if(deconcept.SWFObject.doPrepUnload){if(!deconcept.unloadSet){deconcept.SWFObjectUtil.prepUnload=function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){};window.attachEvent("onunload",deconcept.SWFObjectUtil.cleanupSWFs);};window.attachEvent("onbeforeunload",deconcept.SWFObjectUtil.prepUnload);deconcept.unloadSet=true;}}if(!document.getElementById&&document.all){document.getElementById=function(id){return document.all[id];};}var getQueryParamValue=deconcept.util.getRequestParameter;var FlashObject=deconcept.SWFObject;var SWFObject=deconcept.SWFObject;function openpop(iname,img_width,img_height,where)
{var screen_width=screen.width;var screen_height=screen.height;var x=Math.round((screen_width/2)-(img_width/2));var y=Math.round((screen_height/2)-(img_height/2));var scr="";if(img_width>screen.width||img_height>screen.height)scr="yes";else scr="no";y=y+50;if(where==1){window.open("popupimg.php?where=1&id="+iname+"&w="+img_width+"&h="+img_height+"","_blank","left="+x+",top="+y+",width="+img_width+",height="+(img_height+35)+",scrollbars="+scr);}else{window.open("popupimg.php?id="+iname+"&w="+img_width+"&h="+img_height+"","_blank","left="+x+",top="+y+",width="+img_width+",height="+(img_height+35)+",scrollbars="+scr);}}
var AutoCompliteController=new Object();AutoCompliteController={version:'2.0.0',author:'ToshaUst',insts:Array(),debug:false,getAc:function(name,rpc)
{var tmpAc=new AutoCompliter(name,rpc);var i=this.insts.length;tmpAc.instIndex=i;tmpAc.Acc=this;this.insts[i]=tmpAc;return tmpAc;},getData:function(inputString,instIndex)
{var inst=this.insts[instIndex];if(inst.getHandler!=null)
{clearTimeout(inst.getHandler);inst.getHandler=null;}
inst.lastSearch=inputString;if(inputString.length==0)
{$('#'+inst.divBoxId).hide();}else
{if(typeof(inst.rpc)=='function')
{var ar=inst.rpc(inputString);inst.setData(ar[0],ar[1],ar[2]);}
else
{var ajaxSettings={dataType:'xml',url:inst.rpc,data:'queryString='+inputString+'&instId='+inst.instIndex,success:this.setData,type:'POST'}
if(this.debug)
{ajaxSettings.error=function(){alert('Ajax error');}}
$.ajax(ajaxSettings);}}},setData:function(xml)
{var i=jQuery('instId',xml).text();AutoCompliteController.insts[i].setData(jQuery('data',xml).text(),jQuery('type',xml).text(),jQuery('count',xml).text());},selectItem:function(inst,eItem)
{var stop=0;},move:function(delta,instIndex)
{var inst=this.insts[instIndex];inst.move(delta);},hideList:function(instIndex)
{var inst=this.insts[instIndex];if(inst.hideHandler!=null)
{clearTimeout(inst.hideHandler);inst.hideHandler=null;}
$('#'+inst.divBoxId).hide();inst.listIsShow=false;}}
function AutoCompliter(name,rpc)
{this.inputId=name+'Input'
this.divBoxId=name+'ListBox'
this.divListId=name+'List'
this.countId=name+'Count'
this.rpc=rpc
this.browser=jQuery.browser}
AutoCompliter.prototype={version:'2.0.0',author:'ToshaUst',listIsShow:false,selectedIndex:-1,itemsCount:-1,jqUL:null,keyHandler:null,lastSearch:'',getHandler:null,hideHandler:null,debug:true,lastMove:0,itemsNodeIndex:Array(),disabled:false,withScroll:true,maxHeight:250,fillCallback:null,get_delay:500,hasList:false,getState:function()
{var arState=new Object();for(var elem in this)
{if(typeof(eval('this.'+elem))!='function')
{eval('arState.'+elem+'=this.'+elem);}}
return arState;},keyUp:function(event)
{if(this.disabled)return true;var inpStr=$('#'+this.inputId).val();var cancelEvent=false;var getNeed=true;if(this.hasList)
{if(event&&event.keyCode)
{if(this.listIsShow)
{var kc=event.keyCode;if(kc==40||kc==38)
{cancelEvent=true;getNeed=false;this.stopMove();}
else if(kc==13&&this.selectedIndex>-1)
{cancelEvent=true;getNeed=false;}}}}
if(inpStr==this.lastSearch)getNeed=false;if(getNeed)
{if(this.getHandler!=null)clearTimeout(this.getHandler);this.getHandler=setTimeout("AutoCompliteController.getData('"+inpStr+"',"+this.instIndex+")",this.get_delay);}
event.cancelBubble=cancelEvent;return!cancelEvent;},keyDown:function(event)
{if(this.disabled)return true;if(!this.hasList)return true;var cancelEvent=false;if(event&&event.keyCode)
{if(this.listIsShow)
{var kc=event.keyCode
if(kc==13&&this.selectedIndex>-1)
{try
{this.fill(this.jqUL[0].childNodes[this.itemsNodeIndex[this.selectedIndex]]);}
catch(e){}
cancelEvent=true;}
else if(kc==40)
{this.startMove(1);cancelEvent=true;}
else if(kc==38)
{this.startMove(-1);cancelEvent=true;}}}
event.cancelBubble=cancelEvent;return!cancelEvent;},startMove:function(delta)
{if(!this.browser.opera)
{var d=new Date();var timeNow=d.valueOf();if(this.lastMove+50<timeNow)
{this.lastMove=timeNow;this.move(delta);}}
else
{this.move(delta);this.keyHandler=setInterval("AutoCompliteController.move("+delta+","+this.instIndex+")",100);}},stopMove:function()
{if(this.browser.opera)
{if(this.keyHandler!=null)
{clearInterval(this.keyHandler);}}},selectItem:function(index)
{if(this.selectedIndex>-1)
{var SelectedNodeIndex=this.itemsNodeIndex[this.selectedIndex];$(this.jqUL[0].childNodes[SelectedNodeIndex]).removeClass('selected');}
var NodeIndex=this.itemsNodeIndex[index];var jqSelectingItem=$(this.jqUL[0].childNodes[NodeIndex]);var eSelectingItem=jqSelectingItem[0];jqSelectingItem.addClass('selected');this.selectedIndex=eSelectingItem.i;if(this.withScroll)
{var eScrollBox=eSelectingItem.parentNode.parentNode;var scrollTop=eScrollBox.scrollTop;var heightBox=$(eScrollBox).height();var heightElement=this.getElementRealHeight(eSelectingItem);var offsetTop=eSelectingItem.offsetTop;var maxScrollTop=this.getElementRealHeight(eSelectingItem.parentNode)-heightBox;var topDelta=offsetTop-scrollTop;if(topDelta+heightElement>heightBox)
{eScrollBox.scrollTop=offsetTop-heightBox+heightElement;}
if(topDelta<0)
{if(offsetTop>maxScrollTop)offsetTop=maxScrollTop;eScrollBox.scrollTop=offsetTop;}
var stop=0;}},getElementRealHeight:function(elem)
{var jqElem=$(elem);var Height=$(elem).height();Height+=this.getCSSSizeVal($(elem).css('padding-top'));Height+=this.getCSSSizeVal($(elem).css('padding-bottom'));Height+=this.getCSSSizeVal($(elem).css('margin-top'));Height+=this.getCSSSizeVal($(elem).css('margin-bottom'));return Height;},getCSSSizeVal:function(str)
{return str.replace(new RegExp('[^0-9]','gi'),'')*1;},disable:function()
{this.disabled=true;AutoCompliteController.hideList(this.instIndex);},setData:function(data,type,count)
{this.listIsShow=false;this.selectedIndex=-1;var jqDivList=$('#'+this.divListId);var jqDivBox=$('#'+this.divBoxId);var jqControlTable=jqDivBox.find('.controlTable');if(type=='html')
{this.hasList=true;jqDivList.html(data);this.jqUL=$(jqDivList[0].childNodes[0]);var eUL=this.jqUL[0];if(eUL.nodeType==1)
{this.jqUL[0].AC=this;var child,i=0;for(var j=0,len=eUL.childNodes.length;j<len;j++)
{child=eUL.childNodes[j];if(child.nodeType==1)
{child.i=i;this.itemsNodeIndex[i]=j;child.onmouseover=function(){this.parentNode.AC.selectItem(this.i);};child.onclick=function(){if(this.parentNode.AC.fill)this.parentNode.AC.fill(this);};i++;}}
this.itemsCount=i;jqControlTable.show();var jqCount=$('#'+this.countId);if(jqCount.length>0)
{jqCount.empty();jqCount.append(count);}
this.showList();}
var stop=0;}
else
{this.hasList=false;jqControlTable.hide();if(this.debug)
{jqDivList.html(data);jqDivBox.show();this.listIsShow=true;}}},showList:function()
{var jqDivList=$('#'+this.divListId);var jqDivBox=$('#'+this.divBoxId);var jqInput=$('#'+this.inputId);jqDivList.css('visibility','hidden');jqDivBox.show();var height=jqDivList.height();this.maxHeight=this.getCSSSizeVal(jqDivList.css('max-height'));if(height>this.maxHeight)
{jqDivList.height(this.maxHeight);}
var cssWidth=this.getCSSSizeVal(jqDivBox.css('width'));var width=jqInput.width();if(cssWidth<=0||cssWidth<width)
{jqDivBox.css('width',width);}
jqDivList.css('visibility','');this.listIsShow=true;},fill:function(eItem)
{var val=$(eItem).attr('m_val');$('#'+this.inputId).val(val);$('#'+this.divBoxId).hide();this.listIsShow=false;this.lastSearch=val;$('#'+this.inputId)[0].focus();if(this.fillCallback!=null)
{this.fillCallback(eItem);}},move:function(delta)
{var nextIndex=this.selectedIndex+delta;if(delta>=0)
{if(nextIndex>=this.itemsCount)nextIndex=0;}
else
{if(nextIndex<0)nextIndex=this.itemsCount-1;}
this.selectItem(nextIndex);},hideList:function()
{if(this.hideHandler!=null)clearTimeout(this.hideHandler);this.hideHandler=setTimeout("AutoCompliteController.hideList("+this.instIndex+")",200);}}
function Debbuger(id)
{this.id=id}
Debbuger.prototype={log:function(msg)
{$('#'+this.id)[0].value+=msg+"\r\n";}}
var debuger=new Debbuger('debugtextarea');
