﻿/*add load event*/function addLoadEvent(func){var oldonload=window.onload;if(typeof window.onload!='function'){window.onload=func}else{window.onload=function(){if(oldonload){oldonload()}func()}}}
/*validation scripts*/var _errorMsg="";var _isValid=true;var _errorColor="red";function SelectFormObject(theFieldObjId){var tempval=document.getElementById(theFieldObjId);if(document.all&&document.all[theFieldObjId]){tempval=document.all[theFieldObjId];tempval.focus();tempval.select()}else if(document.getElementById&&document.getElementById(theFieldObjId)){tempval=document.getElementById(theFieldObjId);tempval.focus();tempval.select()}}function fncInputNumericValuesOnly(){if(!(event.keyCode==45||event.keyCode==46||event.keyCode==48||event.keyCode==49||event.keyCode==50||event.keyCode==51||event.keyCode==52||event.keyCode==53||event.keyCode==54||event.keyCode==55||event.keyCode==56||event.keyCode==57)){event.returnValue=false}}function fnTrim(s){var m=s.match(/^\s*(\S+(\s+\S+)*)\s*$/);return(m==null)?"":m[1]}function fnIsBlank(s){return(fnTrim(s)=="")}function fnIsInt(txtVal){var exp=/^\s*[-\+]?\d+\s*$/;if(txtVal.match(exp)==null)return false;var num=parseInt(txtVal,10);if(isNaN(num)){return false}return true}function fnIsFloat(txtVal){if(isNaN(parseFloat(txtVal))){return false}return true}function fnIsEmail(txtVal){var exp="^[\\w-_\.]*[\\w-_\.]\@[\\w]\.+[\\w]+[\\w]$";return!(txtVal.match(exp)==null)}function AddNewErrorMessage(msg){_errorMsg+="* "+msg+"\n";_isValid=false}function CheckIsInt_TextBox(obj,objLbl,msg,allowBlank){if(allowBlank&&fnIsBlank(obj.value)){return true}if(!fnIsInt(obj.value)){SetTextColor(objLbl,_errorColor);AddNewErrorMessage(msg);return false}return true}function CheckIsEmail_TextBox(obj,objLbl,msg,allowBlank){if(allowBlank&&fnIsBlank(obj.value)){return true}if(!fnIsEmail(obj.value)){SetTextColor(objLbl,_errorColor);AddNewErrorMessage(msg);return false}return true}function CheckRequiredField_Radio(radioName,objLbl,msg){if(CheckedRadioIdx(radioName)<0){SetTextColor(objLbl,_errorColor);AddNewErrorMessage(msg);return false}else return true}function CheckedRadioIdx(radioName){var cnt=-1;for(var i=radioName.length-1;i>-1;i--){if(radioName[i].checked){cnt=i;i=-1}}if(cnt<=-1){return-1}else return cnt}function CheckRequiredField_TextBox(obj,objLbl,msg){if(fnTrim(obj.value)==""){SetTextColor(objLbl,_errorColor);AddNewErrorMessage(msg);return false}return true}function SetTextColor(elementId,colorText){if(document.getElementById&&document.getElementById(elementId)){document.getElementById(elementId).style.color=colorText}}function CheckRequiredField_CheckBox(obj,objLbl,msg){var isChecked=false;for(i=0;i<obj.length;i++){if(obj[i].checked){isChecked=true}}if(!isChecked){SetTextColor(objLbl,_errorColor);AddNewErrorMessage(msg);return false}return true}function CheckRequiredField_Select(obj,objLbl,msg){if(fnIsBlank(obj.options[obj.selectedIndex].value)){SetTextColor(objLbl,_errorColor);AddNewErrorMessage(msg);return false}return true}
/*popup*/var _popUp=false;var _popupWidth="450";var _popupHeight="400";var _popupVars="left=20,top=20,toolbar=0,location=0,resizable=1,scrollbars=yes";function OpenPopup2(urlToOpen,width,height){if(_popUp){_popUp.close();_popUp=null}_popUp=window.open(urlToOpen,'mypopup','width='+width+',height='+height+','+_popupVars);if(_popUp){if(window.focus){_popUp.focus()}}else{alert('We have detected that you are using popup blocking software.\nYou need to allow popups for this link to work...')}return false}function OpenPopup(urlToOpen){if(_popUp){_popUp.close();_popUp=null}_popUp=window.open(urlToOpen,'mypopup','width='+_popupWidth+',height='+_popupHeight+','+_popupVars);if(_popUp){if(window.focus){_popUp.focus()}}else{alert('We have detected that you are using popup blocking software.\nYou need to allow popups for this link to work...')}return false}function SetPopupWidth(width){_popupWidth=width}function SetPopupHeight(height){_popupHeight=height}function SetPopupDisplay(displayConfig){_popupVars=displayConfig}
/*nospam*/function SpamBlockEmailSpan(spanId,linkText,user,domain,toplevel){if(document.getElementById&&document.getElementById(spanId)){if(linkText==""){linkText=user+"@"+domain+toplevel}locationstring="mailto:"+user+"@"+domain+toplevel;document.getElementById(spanId).innerHTML="<a href='"+locationstring+"'>"+linkText+"</a>"}}function SpamBlockWindowsLiveMessengerSpan(spanId,linkText,user,domain,toplevel){if(document.getElementById&&document.getElementById(spanId)){if(linkText==""){linkText="Windows Live Messenger: "+user+"@"+domain+toplevel}locationstring="msnim:chat?contact="+user+"@"+domain+toplevel;document.getElementById(spanId).innerHTML="<a onclick=\"return confirm('If you have MSN for chat,this will intiate a chat with this person.');\" href='"+locationstring+"'>"+linkText+"</a>"}}function SpamBlockYahooChatSpan(spanId,linkText,user,domain,toplevel){if(document.getElementById&&document.getElementById(spanId)){if(linkText==""){linkText="Yahoo Chat: "+user+"@"+domain+toplevel}locationstring="ymsgr:sendim?"+user+"@"+domain+toplevel;document.getElementById(spanId).innerHTML="<a onclick=\"return confirm('If you have Yahoo for chat,this will intiate a chat with this person.');\" href='"+locationstring+"'>"+linkText+"</a>"}}function SpamBlockSkypeSpan(spanId,linkText,user){if(document.getElementById&&document.getElementById(spanId)){if(linkText==""){linkText="Skype Call: "+user}locationstring="skype:"+user+"?call";document.getElementById(spanId).innerHTML="<a onclick=\"return confirm('If you have Skype for chat or calls,this will intiate a Skype call to this person.');\" href='"+locationstring+"'>"+linkText+"</a>"}}
/*position elements*/function SetRelativePosition(elemToSet,elemReference,addToTop,addToLeft){var star=document.getElementById(elemToSet);var corner=document.getElementById(elemReference);if(!document.getElementById&&document.all){star=document.all[elemToSet];corner=document.all[elemReference]}var left=0;var top=0;try{while(corner.offsetParent){left+=corner.offsetLeft;if(corner.offsetParent.scrollLeft){left-=corner.offsetParent.scrollLeft}top+=corner.offsetTop;if(corner.offsetParent.scrollTop){top-=corner.offsetParent.scrollTop}corner=corner.offsetParent}}catch(e){}if(PositionElementsBrowserDetect.browser=="Opera"){top+=3}left+=corner.offsetLeft+document.body.scrollLeft-document.body.clientLeft;top+=corner.offsetTop+document.body.scrollTop-document.body.clientTop;top=top+addToTop;left=left+addToLeft;if(document.getElementById||document.all){star.style.top=top+"px";star.style.left=left+"px"}else if(document.layers){star.top=top;star.left=left}if(!top){top=0;left=0;var objFirefox=document.getElementById(elemReference);top=getTopPosition(objFirefox)+addToTop;left=getLeftPosition(objFirefox)+addToLeft;document.getElementById(elemToSet).style.top=top+"px";document.getElementById(elemToSet).style.left=left+"px"}}function getLeftPosition(obj){var curleft=curtop=0;if(obj.offsetParent){curleft=obj.offsetLeft;curtop=obj.offsetTop;while(obj=obj.offsetParent){curleft+=obj.offsetLeft;curtop+=obj.offsetTop}}return curleft}function getTopPosition(obj){var curleft=curtop=0;if(obj.offsetParent){curleft=obj.offsetLeft;curtop=obj.offsetTop;while(obj=obj.offsetParent){curleft+=obj.offsetLeft;curtop+=obj.offsetTop}}return curtop}function findPos(obj){var curleft=curtop=0;if(obj.offsetParent){curleft=obj.offsetLeft;curtop=obj.offsetTop;while(obj=obj.offsetParent){curleft+=obj.offsetLeft;curtop+=obj.offsetTop}}return[curleft,curtop]}var _mouseXPos=0;var _mouseYPos=0;function getMouseXY(e){_mouseXPos=0;_mouseYPos=0;if(IE){_mouseXPos=event.clientX+document.body.scrollLeft;_mouseYPos=event.clientY+document.body.scrollTop}else{_mouseXPos=e.pageX;_mouseYPos=e.pageY}if(_mouseXPos<0){_mouseXPos=0}if(_mouseYPos<0){_mouseYPos=0}return true}function SetRelativeToMouse(elemToSet,addToTop,addToLeft,allowOffScreen){var newX=_mouseXPos+addToLeft;var newY=_mouseXPos+addToTop;if(!allowOffScreen){if(newX<0){newX=0}if(newY<0){newY=0}}if(document.all){document.all[elemToSet].style.top=newY+"px";document.all[elemToSet].style.left=newX+"px"}else if(document.getElementById){document.getElementById(elemToSet).style.top=newY+"px";document.getElementById(elemToSet).style.left=newX+"px"}}function CenterDiv(divId,addToTop,addToLeft){var ie=document.all&&!window.opera;var dom=document.getElementById;iebody=(document.compatMode=="CSS1Compat")?document.documentElement:document.body;objref=(dom)?document.getElementById(divId):document.all[divId];var scroll_top=(ie)?iebody.scrollTop:window.pageYOffset;var docwidth=(ie)?iebody.clientWidth:window.innerWidth;docheight=(ie)?iebody.clientHeight:window.innerHeight;var objwidth=objref.offsetWidth;objheight=objref.offsetHeight;var left=docwidth/2-objwidth/2+addToLeft;var top=scroll_top+docheight/2-objheight/2+addToTop;objref.style.left=left+"px";objref.style.top=top+"px"}var PositionElementsBrowserDetect={init:function(){this.browser=this.searchString(this.dataBrowser)||"An unknown browser";this.version=this.searchVersion(navigator.userAgent)||this.searchVersion(navigator.appVersion)||"an unknown version";this.OS=this.searchString(this.dataOS)||"an unknown OS"},searchString:function(data){for(var i=0;i<data.length;i++){var dataString=data[i].string;var dataProp=data[i].prop;this.versionSearchString=data[i].versionSearch||data[i].identity;if(dataString){if(dataString.indexOf(data[i].subString)!=-1){return data[i].identity}}else if(dataProp){return data[i].identity}}},searchVersion:function(dataString){var index=dataString.indexOf(this.versionSearchString);if(index==-1)return;return parseFloat(dataString.substring(index+this.versionSearchString.length+1))},dataBrowser:[{string:navigator.userAgent,subString:"OmniWeb",versionSearch:"OmniWeb/",identity:"OmniWeb"},{string:navigator.vendor,subString:"Apple",identity:"Safari"},{prop:window.opera,identity:"Opera"},{string:navigator.vendor,subString:"iCab",identity:"iCab"},{string:navigator.vendor,subString:"KDE",identity:"Konqueror"},{string:navigator.userAgent,subString:"Firefox",identity:"Firefox"},{string:navigator.vendor,subString:"Camino",identity:"Camino"},{string:navigator.userAgent,subString:"Netscape",identity:"Netscape"},{string:navigator.userAgent,subString:"MSIE",identity:"Explorer",versionSearch:"MSIE"},{string:navigator.userAgent,subString:"Gecko",identity:"Mozilla",versionSearch:"rv"},{string:navigator.userAgent,subString:"Mozilla",identity:"Netscape",versionSearch:"Mozilla"}],dataOS:[{string:navigator.platform,subString:"Win",identity:"Windows"},{string:navigator.platform,subString:"Mac",identity:"Mac"},{string:navigator.platform,subString:"Linux",identity:"Linux"}]};PositionElementsBrowserDetect.init();
/*flash border*/function updateObjectBorder(objId){if(navigator.appName=="Microsoft Internet Explorer"){if(document.getElementById&&document.getElementById(objId)){var oneObj=document.getElementById(objId);oneObj.outerHTML=oneObj.outerHTML}}}
/*imbedhandler*/function setObjAttribute(attr,value){this.attributes[attr.toLowerCase()]=value}function getObjAttribute(param){return this.attributes[param]||""}function setObjParam(param,value){this.params[param.toLowerCase()]=value}function getObjParam(param){return this.params[param]||""}function writeObjToId(ele){if(document.getElementById&&document.getElementById(ele)){document.getElementById(ele).innerHTML=this.html()}}function embedHtml(){var embedTag="<embed ";for(var key in this.attributes){embedTag+=[key]+'="'+this.attributes[key]+'" '}embedTag+="></embed>";if(this.noEmbed!=""){embedTag+="<noembed>"+this.noEmbed+"</noembed>"}return embedTag}function setNoEmbed(value){this.noEmbed=value}function EmbedHandler(filename,width,height){this.attributes=new Array();this.attributes["src"]=filename;if(width!=""){this.attributes["width"]=width}if(height!=""){this.attributes["height"]=height}this.getAttribute=getObjAttribute;this.setAttribute=setObjAttribute;this.writeToId=writeObjToId;this.html=embedHtml;this.setNoEmbed=setNoEmbed;this.noEmbed=""}function appletHtml(){var appletTag='<applet ';for(var key in this.attributes){appletTag+=[key]+'="'+this.attributes[key]+'" '}appletTag+=">";for(var name in this.params){var paramTag='<param name="'+[name]+'" value="'+this.params[name]+'" />';appletTag+=paramTag}appletTag+=this.altHTML;appletTag+='</applet>';return appletTag}function setAlternateHtml(value){this.altHTML=value}function AppletHandler(archive,code,width,height){this.attributes=new Array();this.attributes["archive"]=archive;this.attributes["code"]=code;this.attributes["width"]=width;this.attributes["height"]=height;this.params=new Array();this.setAttribute=setObjAttribute;this.getAttribute=getObjAttribute;this.setParam=setObjParam;this.getParam=getObjParam;this.writeToId=writeObjToId;this.html=appletHtml;this.setAlternateHtml=setAlternateHtml;this.altHTML=""}

/*swobj*/
if(typeof deconcept=="undefined") var deconcept={};if(typeof deconcept.util=="undefined") deconcept.util={};if(typeof deconcept.SWFObjectUtil=="undefined") deconcept.SWFObjectUtil={};deconcept.SWFObject=function(swf,id,w,h,ver,c,quality,xiRedirectUrl,redirectUrl,detectKey){
 if(!document.getElementById){return;}
 this.DETECT_KEY=detectKey?detectKey:'detectflash';this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);this.params={};this.variables={};this.attributes=[];if(swf){this.setAttribute('swf',swf);}
 if(id){this.setAttribute('id',id);}
 if(w){this.setAttribute('width',w);}
 if(h){this.setAttribute('height',h);}
 if(ver){this.setAttribute('version',new deconcept.PlayerVersion(ver.toString().split(".")));}
 this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion();if(!window.opera&&document.all&&this.installedVer.major>7){
 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(c){this.addParam('bgcolor',c);}
 var q=quality?quality:'high';this.addParam('quality',q);this.setAttribute('useExpressInstall',false);this.setAttribute('doExpressInstall',false);var xir=(xiRedirectUrl)?xiRedirectUrl:window.location;this.setAttribute('xiRedirectUrl',xir);this.setAttribute('redirectUrl','');if(redirectUrl){this.setAttribute('redirectUrl',redirectUrl);}
}
deconcept.SWFObject.prototype={useExpressInstall: function(path){this.xiSWFPath=!path?"expressinstall.swf":path;this.setAttribute('useExpressInstall',true);},setAttribute: function(name,value){this.attributes[name]=value;},getAttribute: function(name){return this.attributes[name]||"";},addParam: function(name,value){this.params[name]=value;},getParams: function(){return this.params;},addVariable: function(name,value){this.variables[name]=value;},getVariable: function(name){return this.variables[name]||"";},getVariables: function(){return this.variables;},getVariablePairs: function(){
 var variablePairs=[];var key;var variables=this.getVariables();for (key in variables){variablePairs[variablePairs.length]=key+"="+variables[key];}
 return variablePairs;
},getSWFHTML: function(){
 var swfNode="";if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){
 if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","PlugIn");this.setAttribute('swf',this.xiSWFPath);}
 swfNode='<embed wmode="transparent" type="application/x-shockwave-flash" src="'+this.getAttribute('swf')+'" width="'+this.getAttribute('width')+'" height="'+this.getAttribute('height')+'" style="'+(this.getAttribute('style')||"")+'"';swfNode+=' id="'+this.getAttribute('id')+'" name="'+this.getAttribute('id')+'" ';var params=this.getParams();for (var key in params){swfNode+=[key]+'="'+params[key]+'" ';}
 var pairs=this.getVariablePairs().join("&");if(pairs.length>0){swfNode+='flashvars="'+pairs+'"';}
 swfNode+='/>';
}else{
 if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");this.setAttribute('swf',this.xiSWFPath);}
 swfNode='<object id="'+this.getAttribute('id')+'" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+this.getAttribute('width')+'" height="'+this.getAttribute('height')+'" style="'+(this.getAttribute('style')||"")+'">';swfNode+='<param name="movie" value="'+this.getAttribute('swf')+'" />';swfNode+='<param name="wmode" value="transparent" />';var params=this.getParams();for (var key in params){swfNode+='<param name="'+key+'" value="'+params[key]+'" />';}
 var pairs=this.getVariablePairs().join("&");if(pairs.length>0){swfNode+='<param name="flashvars" value="'+pairs+'" />';}
 swfNode+="</object>";}
 return swfNode;
},write: function(elementId){
 if(this.getAttribute('useExpressInstall')){var expressInstallReqVer=new deconcept.PlayerVersion([6,0,65]);if(this.installedVer.versionIsValid(expressInstallReqVer)&&!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 elementId=='string')?document.getElementById(elementId):elementId;n.innerHTML=this.getSWFHTML();return true;}else{if(this.getAttribute('redirectUrl')!=""){document.location.replace(this.getAttribute('redirectUrl'));}}
 return false;}}
deconcept.SWFObjectUtil.getPlayerVersion=function(){
 var PlayerVersion=new deconcept.PlayerVersion([0,0,0]);if(navigator.plugins&&navigator.mimeTypes.length){var x=navigator.plugins["Shockwave Flash"];if(x&&x.description){PlayerVersion=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 counter=3;while (axo){try{counter++;axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+counter);PlayerVersion=new deconcept.PlayerVersion([counter,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");PlayerVersion=new deconcept.PlayerVersion([6,0,21]);axo.AllowScriptAccess="always";}catch (e){if(PlayerVersion.major==6){return PlayerVersion;}}
 try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");}catch (e){}
}
 if(axo!=null){PlayerVersion=new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));}
}
 return PlayerVersion;
}
deconcept.PlayerVersion=function(arrVersion){this.major=arrVersion[0]!=null?parseInt(arrVersion[0]):0;this.minor=arrVersion[1]!=null?parseInt(arrVersion[1]):0;this.rev=arrVersion[2]!=null?parseInt(arrVersion[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(param){
 var q=document.location.search||document.location.hash;if(param==null){return q;}
 if(q){var pairs=q.substring(1).split("&");for (var i=0;i<pairs.length;i++){if(pairs[i].substring(0,pairs[i].indexOf("="))==param){return pairs[i].substring((pairs[i].indexOf("=")+1));}}}
 return "";}}
deconcept.SWFObjectUtil.cleanupSWFs=function(){var objects=document.getElementsByTagName("OBJECT");for (var i=objects.length - 1;i >= 0;i--){objects[i].style.display='none';for (var x in objects[i]){if(typeof objects[i][x]=='function'){objects[i][x]=function(){};}}}}
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;
