/*
 * Copyright © 2008 Multimedia Company CSC (www.cural.ru)
 * $Date: 2008-09-01 20:16:03 +0600 (Mon, 01 Sep 2008) $
 * $Version: 1.0.1 $
 */
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(R,O,Q,M,U,T,W,X,N,S){if(!document.getElementById){return }this.DETECT_KEY=S?S:"detectflash";this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);this.params=new Object();this.variables=new Object();this.attributes=new Array();if(R){this.setAttribute("swf",R)}if(O){this.setAttribute("id",O)}if(Q){this.setAttribute("width",Q)}if(M){this.setAttribute("height",M)}if(U){this.setAttribute("version",new deconcept.PlayerVersion(U.toString().split(".")))}this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion();if(!window.opera&&document.all&&this.installedVer.major>7){deconcept.SWFObject.doPrepUnload=true}if(T){this.addParam("bgcolor",T)}var P=W?W:"high";this.addParam("quality",P);this.setAttribute("useExpressInstall",false);this.setAttribute("doExpressInstall",false);var V=(X)?X:window.location;this.setAttribute("xiRedirectUrl",V);this.setAttribute("redirectUrl","");if(N){this.setAttribute("redirectUrl",N)}};deconcept.SWFObject.prototype={useExpressInstall:function(B){this.xiSWFPath=!B?"expressinstall.swf":B;this.setAttribute("useExpressInstall",true)},setAttribute:function(C,D){this.attributes[C]=D},getAttribute:function(B){return this.attributes[B]},addParam:function(D,C){this.params[D]=C},getParams:function(){return this.params},addVariable:function(D,C){this.variables[D]=C},getVariable:function(B){return this.variables[B]},getVariables:function(){return this.variables},getVariablePairs:function(){var E=new Array();var F;var D=this.getVariables();for(F in D){E[E.length]=F+"="+D[F]}return E},getSWFHTML:function(){var L="";if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","PlugIn");this.setAttribute("swf",this.xiSWFPath)}L='<embed type="application/x-shockwave-flash" src="'+this.getAttribute("swf")+'" width="'+this.getAttribute("width")+'" height="'+this.getAttribute("height")+'" style="'+this.getAttribute("style")+'"';L+=' id="'+this.getAttribute("id")+'" name="'+this.getAttribute("id")+'" ';var H=this.getParams();for(var I in H){L+=[I]+'="'+H[I]+'" '}var J=this.getVariablePairs().join("&");if(J.length>0){L+='flashvars="'+J+'"'}L+="/>"}else{if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");this.setAttribute("swf",this.xiSWFPath)}L='<object id="'+this.getAttribute("id")+'" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+this.getAttribute("width")+'" height="'+this.getAttribute("height")+'" style="'+this.getAttribute("style")+'">';L+='<param name="movie" value="'+this.getAttribute("swf")+'" />';var K=this.getParams();for(var I in K){L+='<param name="'+I+'" value="'+K[I]+'" />'}var G=this.getVariablePairs().join("&");if(G.length>0){L+='<param name="flashvars" value="'+G+'" />'}L+="</object>"}return L},write:function(F){if(this.getAttribute("useExpressInstall")){var D=new deconcept.PlayerVersion([6,0,65]);if(this.installedVer.versionIsValid(D)&&!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 E=(typeof F=="string")?document.getElementById(F):F;E.innerHTML=this.getSWFHTML();return true}else{if(this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"))}}return false}};deconcept.SWFObjectUtil.getPlayerVersion=function(){var G=new deconcept.PlayerVersion([0,0,0]);if(navigator.plugins&&navigator.mimeTypes.length){var F=navigator.plugins["Shockwave Flash"];if(F&&F.description){G=new deconcept.PlayerVersion(F.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 J=1;var I=3;while(J){try{I++;J=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+I);G=new deconcept.PlayerVersion([I,0,0])}catch(H){J=null}}}else{try{var J=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7")}catch(H){try{var J=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");G=new deconcept.PlayerVersion([6,0,21]);J.AllowScriptAccess="always"}catch(H){if(G.major==6){return G}}try{J=new ActiveXObject("ShockwaveFlash.ShockwaveFlash")}catch(H){}}if(J!=null){G=new deconcept.PlayerVersion(J.GetVariable("$version").split(" ")[1].split(","))}}}return G};deconcept.PlayerVersion=function(B){this.major=B[0]!=null?parseInt(B[0]):0;this.minor=B[1]!=null?parseInt(B[1]):0;this.rev=B[2]!=null?parseInt(B[2]):0};deconcept.PlayerVersion.prototype.versionIsValid=function(B){if(this.major<B.major){return false}if(this.major>B.major){return true}if(this.minor<B.minor){return false}if(this.minor>B.minor){return true}if(this.rev<B.rev){return false}return true};deconcept.util={getRequestParameter:function(G){var F=document.location.search||document.location.hash;if(G==null){return F}if(F){var H=F.substring(1).split("&");for(var E=0;E<H.length;E++){if(H[E].substring(0,H[E].indexOf("="))==G){return H[E].substring((H[E].indexOf("=")+1))}}}return""}};deconcept.SWFObjectUtil.cleanupSWFs=function(){var F=document.getElementsByTagName("OBJECT");for(var E=F.length-1;E>=0;E--){F[E].style.display="none";for(var D in F[E]){if(typeof F[E][D]=="function"){F[E][D]=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(B){return document.all[B]}}var getQueryParamValue=deconcept.util.getRequestParameter;var FlashObject=deconcept.SWFObject;var SWFObject=deconcept.SWFObject;var isQTP=false;var isWMP=false;var isIPX=false;function mpd(){var G=navigator,F,B,A,C,D=G.userAgent.toLowerCase();if(G.plugins!=null&&G.plugins.length>0){G.plugins.refresh(true);for(A=0;A<G.plugins.length;A++){F=G.plugins[A];if(F.name.indexOf("QuickTime")>=0){isQTP=true}if(F.name.indexOf("Windows Media Player")>=0){isWMP=true}if(F.description.indexOf("IPIX")!=-1){for(C=0;C<F.length;C++){B=F[C];if(typeof B=="object"){if(B.enabledPlugin&&(B.suffixes.indexOf("ipx")!=-1)){isIPX=true}}}}}}else{if(document.all&&D.indexOf("win")!=-1&&D.indexOf("16bit")==-1){var E="";E+='<script language="VBScript"> \n';E+="on error resume next \n";E+='set theWM = CreateObject("MediaPlayer.MediaPlayer.1") \n';E+='set theQT = CreateObject("QuickTimeCheckObject.QuickTimeCheck.1") \n';E+='theIPX1 = IsObject(CreateObject("IPIX.Viewers.5")) \n';E+='theIPX2 = IsObject(CreateObject("IPIX.ActiveXCtrl.2")) \n';E+='theIPX3 = IsObject(CreateObject("IPIX.ActiveXCtrl.5")) \n';E+="on error  goto 0 \n";E+="If IsObject(theWM) Then \n";E+="isWMP = true \n";E+="End if \n";E+="If IsObject(theQT) Then \n";E+="If theQT.IsQuickTimeAvailable(0) Then 'Just check for file \n";E+="isQTP = true \n";E+="theQTV = hex(theQT.QuickTimeVersion) \n";E+="End if \n";E+="End if \n";E+="If theIPX1 = true or theIPX2 = true or theIPX3 = true Then \n";E+="isIPX = true \n";E+="End if \n";E+="<\/script> \n";document.write(E)}}}function wp(A,G,D,H,B){mpd();var F,E,C,J=0,I="";C=(F=A.split(".")).length;E=F[C-1];B=(null!=B)?B:"";switch(E){case"ipx":if(isIPX){J=1}else{if(isQTP&&6528==theQTV.substring(0,4)){J=2}}break;case"mov":if(isQTP){J=2}break;default:if(!isWMP&&isQTP){J=2}else{if(isWMP){J=3}}}switch(J){case 1:I+="<object";I+=' width="'+G+'"';I+=' height="'+D+'"';I+=' classid="clsid:11260943-421B-11D0-8EAC-0000C07D88CF"';I+=' codebase="http://www.ipix-i.com/download/ipixx.cab#version=6,2,0,5" '+B+">";I+='<param name="_Version" value="65536" />';I+='<param name="_ExtentX" value="11924" />';I+='<param name="_ExtentY" value="9278" />';I+='<param name="_StockProps" value="0" />';I+='<param name="IPXFILENAME" value="'+A+'" />';I+='<embed src="'+A+'"';I+=' width="'+G+'"';I+=' height="'+D+'"';I+=' palette="FOREGROUND"';I+=' type="application/x-ipix"';I+=' pluginspage="http://www.ipix.com/cgi-bin/download.cgi"';I+=' _version="65536"';I+=' _extentx="11924"';I+=' _extenty="9278"';I+=' _stockprops="0"';I+=' ipxfilename="'+A+'" '+B+">";I+="</embed>";I+="<noembed>"+H+"</noembed>";I+="</object>";break;case 2:I+="<object";I+=' width="'+G+'"';I+=' height="'+D+'"';I+=' classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B"';I+=' codebase="http://www.apple.com/qtactivex/qtplugin.cab" '+B+">\n";I+='<param name="src" value="'+A+'" />\n';I+='<param name="autoplay" value="true" />\n';I+='<param name="loop" value="true" />\n';I+='<param name="controller" value="false" />\n';I+='<param name="pluginspage" value="http://www.apple.com/quicktime/download/" />\n';I+='<embed src="'+A+'"';I+=' width="'+G+'"';I+=' height="'+D+'"';I+=' type="video/quicktime"';I+=' pluginspage="http://www.apple.com/quicktime/download/"';I+=' autoplay="true"';I+=' loop="true"';I+=' controller="false" '+B+">";I+="</embed>";I+="<noembed>"+H+"</noembed>";I+="</object>";break;case 3:I+="<object";I+=' width="'+G+'"';I+=' height="'+D+'"';I+=' classid="clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95"';I+=' codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,7,1112"';I+=' standby="Loading Microsoft Windows Media Player components..." '+B+">";I+='<param name="FileName" value="'+A+'" />';I+='<param name="ShowControls" value="0" />';I+='<param name="ShowStatusBar" value="0" />';I+='<param name="ShowDisplay" value="0" />';I+='<param name="ShowTracker" value="0" />';I+='<param name="EnableTracker" value="0" />';I+='<param name="EnableContextMenu" value="1" />';I+='<param name="ShowPositionControls" value="0" />';I+='<param name="ShowSelectionControls" value="0" />';I+='<param name="EnablePositionControls" value="0" />';I+='<param name="EnableSelectionControls" value="0" />';I+='<param name="AllowHideDisplay" value="0" />';I+='<param name="AllowHideControls" value="0" />';I+='<param name="MovieWindowSize" value="0" />';I+='<param name="FullScreenMode" value="0" />';I+='<param name="MovieWindowWidth" value="0" />';I+='<param name="MovieWindowHeight" value="0" />';I+='<param name="AutoStart" value="1" />';I+='<param name="AutoRewind" value="1" />';I+='<param name="PlayCount" value="1" />';I+='<param name="SelectionStart" value="0" />';I+='<param name="SelectionEnd" value="48.5151388" />';I+='<param name="Appearance" value="0" />';I+='<param name="BorderStyle" value="0" />';I+='<param name="DisplayMode" value="0" />';I+='<param name="AllowChangeDisplayMode" value="0" />';I+='<param name="DisplayForeColor" value="16777215" />';I+='<param name="DisplayBackColor" value="0" />';I+='<param name="AutoSize" value="0" />';I+='<param name="Version" value="1" />';I+='<param name="pluginspage" value="http://www.microsoft.com/windows/windowsmedia/download/" />';I+='<embed src="'+A+'"';I+=' width="'+G+'"';I+=' height="'+D+'"';I+=' type="application/x-mplayer2"';I+=' pluginspage="http://www.microsoft.com/windows/windowsmedia/download/"';I+=' showcontrols="0"';I+=' showdisplay="0"';I+=' showtracker="0"';I+=' showstatusbar="0"';I+=' fullscreenmode="0" '+B+">";I+="</embed>";I+="<noembed>"+H+"</noembed>";I+="</object>";break;default:return document.write(H)}return document.write(I)};var Forms={};Forms.conf={prefix_req_field_id:"req",prefix_error_elem_id:"error",prefix_help_elem_id:"help",error_field_classname:"input-field-error"};Forms.Form=function(B,A){B=(null!=B&&"object"==typeof B)?B:document.getElementById(B);if(null==B){return false}this.oForm=B;this.aFields={};this.aButtons={};this.aLabels={};this.reqprefix=A||Forms.conf.prefix_req_field_id;this.init()};Forms.Field=function(B,A){this.oField=B;this.pType=A||""};Forms.Button=function(A,B){this.oButton=A;this.pType=B||""};Forms.Label=function(A,B){this.oLabel=A;this.pFor=B};Forms.Form.prototype.init=function(){var N=this,F,E,C,D,K,I,H,B,A,M,J,L;I=this.oForm.elements;for(F=0,C=I.length;F<C;F++){switch(I[F].type){case"submit":this.aButtons[I[F].type]=new Forms.Button(I[F],L);I[F].onclick=function(){return function(){if(N.validate()){this.value="Loading...";this.disabled=true;this.form.submit()}else{return false}}}();break;case"reset":this.aButtons[I[F].type]=new Forms.Button(I[F],L);I[F].onclick=function(){return function(){return confirm(this.value+"?")}}();break;default:B=(I[F].name)?I[F].name:I[F].id;if(-1!=B.indexOf(this.reqprefix+":")){A=B.replace(this.reqprefix+":","");L=I[F].value.replace(/\s.*/gi,"");if(""==A){continue}if(null!=I[A]&&"object"==typeof I[A]){this.aFields[A]=new Forms.Field(I[A],L);if(null==this.oForm.focally){if(""==I[A].value&&1==I[A].tabIndex){this.oForm.focally=A;I[A].focus()}}}}}}H=this.oForm.getElementsByTagName("label");for(F=0,C=H.length;F<C;F++){if(H[F].htmlFor&&null!=this.aFields[H[F].htmlFor]){this.aLabels[H[F].htmlFor]=new Forms.Label(H[F],H[F].htmlFor);K=document.getElementById(Forms.conf.prefix_help_elem_id+":"+H[F].htmlFor);if(null!=K&&"object"==typeof K){H[F].onclick=function(O){return function(){if("none"==N.getElementStyle(O,"display")){O.style.display="block"}else{O.style.display="none"}return true}}(K);H[F].style.borderBottom="1px dashed"}else{H[F].title=""}}}J=this.oForm.getElementsByTagName("a");for(F=0,C=J.length;F<C;F++){if(-1!=J[F].id.indexOf(Forms.conf.prefix_req_field_id+":")){B=J[F].id.replace(Forms.conf.prefix_req_field_id+":","");if(-1!=B.indexOf(":")){A=B.substr(0,B.indexOf(":"));B=B.substr(B.indexOf(":")+1);var G=[];M=this.oForm.getElementsByTagName(A);for(E=0,D=M.length;E<D;E++){if(B==M[E].className){G[G.length]=M[E]}}J[F].onclick=function(O){return function(){var Q,P;P=O.childNodes.length;if(P>1){for(Q=0;Q<P;Q++){O.childNodes[Q].style.display=("none"==N.getElementStyle(O.childNodes[Q],"display"))?"block":"none"}}for(Q=0,P=G.length;Q<P;Q++){G[Q].style.display=("none"==N.getElementStyle(G[Q],"display"))?"block":"none"}return false}}(J[F]);break}}}return true};Forms.Form.prototype.validate=function(){var D,C,A,F=this.aFields,B=true,E=null;for(D in F){switch(F[D].oField.type){case"text":case"hidden":case"file":case"textarea":case"password":B=this.errorHandler(F[D],F[D].oField.value);break;case"radio":for(C=1,A=F[D].oField[F[D].oField.name].length;C<A;C++){if(F[D].oField[F[D].oField.name][C].checked){B=false;break}}break;case"checkbox":B=F[D].oField.checked;break;case"select-one":B=(0==F[D].oField.options.length)?true:this.errorHandler(F[D],F[D].oField.options[F[D].oField.selectedIndex].value);break;case"select-multiple":for(C=1,A=F[D].oField.options.length;C<A;C++){if(F[D].oField.options[C].selected){B=this.errorHandler(F[D],F[D].oField.options[C].value)}}break;default:}if(!B){this.errorShower(F[D],B)}else{E=(null==E)?F[D]:E}}if(null!=E){this.errorShower(E,true);return false}return true};Forms.Form.prototype.errorHandler=function(G,H){var B=true,F=G.pType,C,A,D,E="";if(null==H||"undefined"==H||0==H.length){return B}switch(F){case"login":if(3>H.length||20<H.length){B=true}else{D=/^[a-zA-Z0-9-]+$/;B=(H.match(D))?false:true}break;case"surname":D=/\s{2,}/;H=H.replace(D," ");G.oField.value=H;if(3>H.length||30<H.length){B=true}else{D=/^([à-ÿÀ-ßa-zA-Z]+[-\s]?[à-ÿÀ-ßa-zA-Z]+)+$/;B=(H.match(D))?false:true}break;case"email":D=/\.{2,}/;H=H.replace(D,".");G.oField.value=H;if(7>H.length||40<H.length){B=true}else{D=/^[\w-]+(\.[\w-]+)*@([\w-]+\.)+[a-zA-Z]{2,7}$/;B=(H.match(D))?false:true}break;case"passw":case"code":if(3>H.length||32<H.length){B=true}else{D=/^[a-zA-Z0-9]+$/;B=(H.match(D))?false:true}break;case"imgcode":if(6!=H.length){B=true}else{D=/^[a-zA-Z0-9]+$/;B=(H.match(D))?false:true}break;case"phone":D=/[^0-9]/g;E=H.replace(D,"");if(8==E.charAt(0)||7==E.charAt(0)){E=E.substr(1)}if(9<E.length||12>E.length){H="8 ";for(C=0,A=E.length;C<A;C++){if(7<A){H+=(0==C)?"(":((3==C)?") ":"")}H+=E.charAt(C)+((((7>=A&&C==2)||C==4||C==7||C==9)&&E.charAt(C+1))?"-":"")}G.oField.value=H;B=false}break;case"int":case"number":case"float":D=/[,\.]{2,}/;H=H.replace(D,".");if(G.oField.value){G.oField.value=H}D=/^-?(\d+)\.?(\d+)?$/;B=(H.match(D))?false:true;break;case"text":case"string":case"message":H=H.toString();B=(H.length>=3)?false:true;break;default:}return B};Forms.Form.prototype.errorShower=function(F,B){var D,E,A,C;A=document.getElementById(Forms.conf.prefix_error_elem_id+":"+F.oField.id);C=document.getElementById(Forms.conf.prefix_help_elem_id+":"+F.oField.id);if(null!=A&&"object"==typeof A){if(B){A.style.display="block";E=F.oField.className.replace(Forms.conf.error_field_classname,"");switch(F.oField.type){case"text":case"file":case"textarea":case"password":F.oField.className=(""==E)?Forms.conf.error_field_classname:E+" "+Forms.conf.error_field_classname;F.oField.focus()}if(F.oField.select){F.oField.select()}if(null!=C&&"object"==typeof C){C.style.display="block"}}else{A.style.display="none";F.oField.className=F.oField.className.replace(Forms.conf.error_field_classname,"");if(null!=C&&"object"==typeof C){C.style.display="none"}return true}}return false};Forms.Form.prototype.getElementStyle=function(C,A,B){var D="",B=B||A;if(null==C||"object"!=typeof C||!A){return D}if(C.currentStyle){D=C.currentStyle[A]}else{if(window.getComputedStyle&&B){D=window.getComputedStyle(C,"").getPropertyValue(B)}}return D};
