
if(!myClockId_hour||myClockId_hour=='')var myClockId_hour='_hour';if(!myClockId_min||myClockId_min=='')var myClockId_min='_min';if(!myClockId_sec||myClockId_sec=='')var myClockId_sec='_sec';function startClock_Timers(){var ClockIntervalSet=setInterval("clockGoesOn();",1000);}
function clockGoesOn(){if(myClockId_hour!="_hour"){var myClocksId_hour=myClockId_hour.split(",");var myClocksId_min=myClockId_min.split(",");var myClocksId_sec=myClockId_sec.split(",");if(myClocksId_hour.length==myClocksId_min.length&&myClocksId_min.length==myClocksId_sec.length){for(var i=0;i<myClocksId_hour.length;i++){if(document.getElementById(myClocksId_hour[i])){if(document.getElementById(myClocksId_hour[i]).value)var myH=document.getElementById(myClocksId_hour[i]).value;else var myH=document.getElementById(myClocksId_hour[i]).innerHTML;if(document.getElementById(myClocksId_min[i]).value)var myM=document.getElementById(myClocksId_min[i]).value;else var myM=document.getElementById(myClocksId_min[i]).innerHTML;if(document.getElementById(myClocksId_sec[i]).value)var myS=document.getElementById(myClocksId_sec[i]).value;else var myS=document.getElementById(myClocksId_sec[i]).innerHTML;myHours=parseInt(myH);myMinutes=parseInt(myM);mySeconds=parseInt(myS)+1;if(mySeconds==60){mySeconds='00';myMinutes=myMinutes+1;}
else if(mySeconds<10)mySeconds='0'+mySeconds;if(myMinutes==60){myMinutes=0;myHours=myHours+1;}
else if(myMinutes<10)myMinutes='0'+myMinutes;if(myHours==24){myHours=0;myMinutes=0;mySeconds=0;}
else if(myHours<10)myHours='0'+myHours;if(document.getElementById(myClocksId_hour[i]).value)document.getElementById(myClocksId_hour[i]).value=myHours;else document.getElementById(myClocksId_hour[i]).innerHTML=myHours;if(document.getElementById(myClocksId_min[i]).value)document.getElementById(myClocksId_min[i]).value=myMinutes;else document.getElementById(myClocksId_min[i]).innerHTML=myMinutes;if(document.getElementById(myClocksId_sec[i]).value)document.getElementById(myClocksId_sec[i]).value=mySeconds;else document.getElementById(myClocksId_sec[i]).innerHTML=mySeconds;}}}}}var lastActivePing=0;function sk2_connexion_ping(isActive){ajax.replace('index.php','ajaxActions_div','post','ajaxAction=ajax_actions.php&connexion_action=connexion_ping&connexion_active='+isActive);if(isActive==1)lastActivePing=0;if(lastActivePing>300){setTimeout('sk2_connexion_ping(0)',240000);lastActivePing=lastActivePing+240;}
else{setTimeout('sk2_connexion_ping(0)',60000);lastActivePing=lastActivePing+60;}}
function sk2_connexion_pingDelayed(){if(document.getElementById('ajaxActions_div'))setTimeout('sk2_connexion_ping(1)',5000);else setTimeout('sk2_connexion_pingDelayed(1)',10000);}
if(document.getElementById('ajaxActions_div'))setTimeout('sk2_connexion_ping(1)',5000);else setTimeout('sk2_connexion_pingDelayed(1)',10000);function referThisPageToFriend(){openModalWindow_sk('none');ajax.replace('index.php','modalWindowContentWrapper_'+numberModalWindowOpen,'post','ajaxAction=client_file/themes/'+JS_SITE_THEME+'/forms/refer_a_friend.php&myURL='+JS_SCRIPT_URI_REFER_FRIEND+'&thisWindow=modalWindowContentWrapper_'+numberModalWindowOpen);}function tel_autoformat(myValue){var telClean=myValue;telClean=telClean.replace('(','');telClean=telClean.replace('-','');telClean=telClean.replace('-','');telClean=telClean.replace(')','');var lastValue=telClean.substr(-1);if(!isNumeric(lastValue)){return myValue.substr(0,myValue.length-1);}
if(telClean.length<4)return'('+telClean.substr(0,3);else if(telClean.length>=4&&telClean.length<7)return'('+telClean.substr(0,3)+')-'+telClean.substr(3,3);else if(telClean.length>=7&&telClean.length<11)return'('+telClean.substr(0,3)+')-'+telClean.substr(3,3)+'-'+telClean.substr(6,4);else if(telClean.length>=11)return'('+telClean.substr(0,3)+')-'+telClean.substr(3,3)+'-'+telClean.substr(6,4);}
function addEvent(el,eventName,callback){if(el.attachEvent){el.attachEvent("on"+eventName,callback);}else if(el.addEventListener){el.addEventListener(eventName,callback,true);}else{el["on"+eventName]=callback;}}
function removeEvent(el,eventName,callback){if(el.detachEvent){el.detachEvent("on"+eventName,callback);}else if(el.removeEventListener){el.removeEventListener(eventName,callback,true);}else{el["on"+eventName]=null;}}
function stopEvent(ev){ev||(ev=window.event);if(el.detachEvent){ev.cancelBubble=true;ev.returnValue=false;}else{ev.preventDefault();ev.stopPropagation();}
return false;}
var numberModalWindowOpen=0;function openModalWindow_sk(myButtons,myButtonName,mySizeW,mySizeH,posMTop,posMLeft,windowAllBackground,content){if(!myButtons)var myButtons='none';if(!myButtonName)var myButtonName='';if(!mySizeW)var mySizeW='';if(!mySizeH)var mySizeH='';if(!posMTop)var posMTop='';if(!posMLeft)var posMLeft='';if(!windowAllBackground)var windowAllBackground='';document.body.style.overflow='hidden';document.getElementById('modalWindowShadow').style.top=getScrollOffset().top;if(MYBROWSER=='MSIE'&&MYBROWSER_MSIE8=='NO')document.getElementById('putModalWindowsInHere').style.top=getScrollOffset().top;numberModalWindowOpen=numberModalWindowOpen+1;if(mySizeW>0)windowSizeWidth=mySizeW;else windowSizeWidth=775;if(mySizeH>0)windowSizeHeight=mySizeH;else windowSizeHeight=465;showHideVideoForModalWindow('hide');var noClosingButton=0;if(myButtons=='none'&&myButtonName!='')myButtons='<input type="button" value="'+myButtonName+'" onclick="closeModalWindow_sk();" />';else if(myButtons=='')myButtons='<input type="button" value="Close" onclick="closeModalWindow_sk();" />';else if(myButtons=='none'){var noClosingButton=1;myButtons='&nbsp;';}
var el='';var mySize=getWindowSize();var newInput=document.createElement('div');newInput.setAttribute('id','modalWindowPosition_'+numberModalWindowOpen);document.getElementById('putModalWindowsInHere').appendChild(newInput);el=document.getElementById('modalWindowPosition_'+numberModalWindowOpen);el.style.position='fixed';el.style.zIndex='35'+(numberModalWindowOpen*10);el.style.width=windowSizeWidth+'px';el.style.height=windowSizeHeight+'px';el.style.border='2px groove gray';if(windowAllBackground&&windowAllBackground!='')el.style.background=windowAllBackground;else el.style.background='#ffffff';var positionMarginTop=Math.floor((parseInt(mySize.height)-parseInt(el.style.height.replace('px','')))/2)+'px';if(posMTop&&posMTop>0)el.style.marginTop=posMTop;else el.style.marginTop=positionMarginTop;var positionMarginLeft=Math.floor((parseInt(mySize.width)-parseInt(el.style.width.replace('px','')))/2)+'px';if(posMLeft&&posMLeft>0)el.style.marginLeft=posMLeft;else el.style.marginLeft=positionMarginLeft;newInput=document.createElement('div');newInput.setAttribute('id','modalWindowContentWrapper_'+numberModalWindowOpen);document.getElementById('modalWindowPosition_'+numberModalWindowOpen).appendChild(newInput);el=document.getElementById('modalWindowContentWrapper_'+numberModalWindowOpen);el.style.width=windowSizeWidth+'px';if(noClosingButton==0)el.style.height=(windowSizeHeight-30)+'px';else el.style.height=windowSizeHeight+'px';el.style.overflow='auto';if(windowAllBackground&&windowAllBackground!='')el.style.background=windowAllBackground;else el.style.background='#ffffff';newInput=document.createElement('div');newInput.setAttribute('id','modalWindowContent_'+numberModalWindowOpen);document.getElementById('modalWindowContentWrapper_'+numberModalWindowOpen).appendChild(newInput);el=document.getElementById('modalWindowContent_'+numberModalWindowOpen);el.innerHTML='<div style="text-align:center;"><img src="images/ajax-loader.gif" alt="Loading Icon" /></div>';if(windowAllBackground&&windowAllBackground!='')el.style.background=windowAllBackground;else el.style.background='#ffffff';if(noClosingButton==0){newInput=document.createElement('div');newInput.setAttribute('id','modalWindowButtons_'+numberModalWindowOpen);document.getElementById('modalWindowPosition_'+numberModalWindowOpen).appendChild(newInput);el=document.getElementById('modalWindowButtons_'+numberModalWindowOpen);el.style.paddingTop='3px';el.style.textAlign='center';el.innerHTML=myButtons;if(windowAllBackground&&windowAllBackground!='')el.style.background=windowAllBackground;else el.style.background='#ffffff';}
el=document.getElementById('modalWindowShadow');if(el.style.display=='none'){el.style.display='';document.getElementById('modalWindowShadow').style.display='';document.getElementById('putModalWindowsInHere').style.display='';}
if(content!=undefined){var thisWindow=document.getElementById('modalWindowContentWrapper_'+numberModalWindowOpen);if(typeof(content)=='object'){while(thisWindow.hasChildNodes())thisWindow.removeChild(thisWindow.firstChild);thisWindow.appendChild(content);}
else if(typeof(content)=='string'){thisWindow.innerHTML=content;}}
return'modalWindowContentWrapper_'+numberModalWindowOpen;}
function closeModalWindow_sk(closeAll){var wrapper=document.getElementById('putModalWindowsInHere');var divToDelete=document.getElementById('modalWindowPosition_'+numberModalWindowOpen);wrapper.removeChild(divToDelete);numberModalWindowOpen=numberModalWindowOpen-1;if(numberModalWindowOpen<=0){document.getElementById('modalWindowShadow').style.display='none';document.getElementById('putModalWindowsInHere').style.display='none';document.body.style.overflow='auto';showHideVideoForModalWindow('show');}
if(closeAll)closeModalWindow_sk(closeAll);}
function showHideVideoForModalWindow(myAction){var children,myName;children=document.body.getElementsByTagName('*');for(var i=0;i<children.length;i++){myName=children[i].getAttribute("name");if(myName!=null&&myName=='video_to_hide_when_modal_window'){if(myAction=="show")children[i].style.display='';else children[i].style.display='none';}}}
function openTranslatorWindow(myOriginalValueId){openModalWindow_sk('<input type="button" value="Save and exit" onclick="saveTranslatorEntry();" />');var myOriginalValue=document.getElementById(myOriginalValueId).value;myOriginalValue=myOriginalValue.replace(/&/g,'LINKANDTAG');var myFieldType=document.getElementById(myOriginalValueId).type;ajax.replace('index.php','modalWindowContent_'+numberModalWindowOpen,'post','ajaxAction=system/language_translator.php&action=showTranslatorbox&originalValue='+myOriginalValue+'&fieldType='+myFieldType);}
function saveTranslatorEntry(){ajax.replace('index.php','modalWindowContent_'+numberModalWindowOpen,'post',ajax.formToUrlArguments('language_translator_form'));closeModalWindow_sk();}function flash(tag){document.write(tag);}
var colorValuesRGB=new Array();colorValuesRGB[0]='0';colorValuesRGB[1]='1';colorValuesRGB[2]='2';colorValuesRGB[3]='3';colorValuesRGB[4]='4';colorValuesRGB[5]='5';colorValuesRGB[6]='6';colorValuesRGB[7]='7';colorValuesRGB[8]='8';colorValuesRGB[9]='9';colorValuesRGB[10]='A';colorValuesRGB[11]='B';colorValuesRGB[12]='C';colorValuesRGB[13]='D';colorValuesRGB[14]='E';colorValuesRGB[15]='F';var colorValuesHex=new Array();colorValuesHex[0]=0;colorValuesHex[1]=1;colorValuesHex[2]=2;colorValuesHex[3]=3;colorValuesHex[4]=4;colorValuesHex[5]=5;colorValuesHex[6]=6;colorValuesHex[7]=7;colorValuesHex[8]=8;colorValuesHex[9]=9;colorValuesHex['A']=10;colorValuesHex['B']=11;colorValuesHex['C']=12;colorValuesHex['D']=13;colorValuesHex['E']=14;colorValuesHex['F']=15;var newColorValues;function getColorValues(checkFrom,hexValue,rgbValue0,rgbValue1,rgbValue2){var myValuesReturned=new Array();if(hexValue=="")hexValue=000000;if(!parseInt(rgbValue0)>0)rgbValue0=0;if(!parseInt(rgbValue1)>0)rgbValue1=0;if(!parseInt(rgbValue2)>0)rgbValue2=0;myValuesReturned['hex']=hexValue;myValuesReturned['rgb0']=rgbValue0;myValuesReturned['rgb1']=rgbValue1;myValuesReturned['rgb2']=rgbValue2;if(checkFrom=='hex'){var r1=hexValue.substring(0,1);var r2=hexValue.substring(1,2);var g1=hexValue.substring(2,3);var g2=hexValue.substring(3,4);var b1=hexValue.substring(4,5);var b2=hexValue.substring(5,6);myValuesReturned['rgb0']=parseInt((colorValuesHex[r1.toUpperCase()]*16)+colorValuesHex[r2.toUpperCase()]);myValuesReturned['rgb1']=parseInt((colorValuesHex[g1.toUpperCase()]*16)+colorValuesHex[g2.toUpperCase()]);myValuesReturned['rgb2']=parseInt((colorValuesHex[b1.toUpperCase()]*16)+colorValuesHex[b2.toUpperCase()]);}
else{var r1=Math.floor(rgbValue0/16);var r2=rgbValue0-(r1*16);var g1=Math.floor(rgbValue1/16);var g2=rgbValue1-(g1*16);var b1=Math.floor(rgbValue2/16);var b2=rgbValue2-(b1*16);myValuesReturned['hex']=colorValuesRGB[r1]+colorValuesRGB[r2]+colorValuesRGB[g1]+colorValuesRGB[g2]+colorValuesRGB[b1]+colorValuesRGB[b2];}
newColorValues=myValuesReturned;}
function showSpcMessage(mesg){if(mesg!="")alert(mesg);}
function isNumeric(VARIABLE){if(String(VARIABLE).match(/^\d+$/))return true;return false;}
function passwordSecurityCheck(password,whichIdBox){var sLevel=0;if(password.length<=3)sLevel=0;else if(password.length>3&&parseInt(password.length)<=5)sLevel=1;else if(password.length>5&&parseInt(password.length)<=7)sLevel=2;else if(password.length>7)sLevel=3;if(String(password).match(/\d+/))sLevel++;if(String(password).match(/[A-Z]/))sLevel++;if(String(password).match(/[^\w\d]/))sLevel++;if(document.getElementById(whichIdBox))document.getElementById(whichIdBox).innerHTML=securityLevel[sLevel];}
function loadFormPassSecCheck(){if(document.getElementById('password_sec_input')){passwordSecurityCheck(document.getElementById('password_sec_input').value,'password_security');}}
function changePicInBio(valMF,gTag){if(valMF==1)document.getElementById(gTag+'_image_fileName').src="client_file/images/"+gTag+"_character_pics/nopic_m.gif";else if(valMF==2)document.getElementById(gTag+'_image_fileName').src="client_file/images/"+gTag+"_character_pics/nopic_f.gif";}
var previousMessage="";var alertOnce=0;function shoutWrite(elementId,message){var maxChars2=shoutMaxCharsI-1;if(message.length<maxChars2)document.getElementById('textareaMaxLength_'+elementId).innerHTML='characters: '+String(message.length)+' / '+shoutMaxCharsS;else{document.getElementById('textareaMaxLength_'+elementId).innerHTML='characters: '+String(message.length)+' / '+shoutMaxCharsS;document.getElementById('shoutMessageId_'+elementId).value=message.substring(0,maxChars2);if(alertOnce==0){alert('You have reached '+shoutMaxCharsS+' characters for your post. You can not exceed '+shoutMaxCharsS+' characters.');alertOnce=1;}}}
var lastCheckKeyVal='';function checkIfAZaz09(tVal,elId){var len=String(tVal).length;var iVal='';var foundIllegalChar=0;for(var i=0;i<len;i++){iVal=String(tVal).substring(i,i+1);if(!iVal.match(/\w/))foundIllegalChar=1;}
if(foundIllegalChar==0)lastCheckKeyVal=tVal;else{alert(' / The template name can contain only letters A-Z and a-z or numbers 0-9. No other symbol or space or key will be accepted');document.getElementById(elId).value=lastCheckKeyVal;}}
function checkIfAZaz09_straight(tVal){var len=String(tVal).length;var iVal='';var foundIllegalChar=0;for(var i=0;i<len;i++){iVal=String(tVal).substring(i,i+1);if(!iVal.match(/\w/))foundIllegalChar=1;}
if(foundIllegalChar==0)return true;else return false}
function disableEnterKey(e){var key;if(window.event)key=window.event.keyCode;else key=e.which;return(key!=13);}
var holdingKey_shift="no";var holdingKey_e="no";function holdPlusClickEdit(e,doingWhat){var key;if(window.event)key=window.event.keyCode;else key=e.which;if(doingWhat=="down"&&key==69)holdingKey_shift="yes";else if(doingWhat=="up"&&key==69)holdingKey_shift="no";if(doingWhat=="down"&&key==16)holdingKey_e="yes";else if(doingWhat=="up"&&key==16)holdingKey_e="no";if(doingWhat=="mouseDown"&&holdingKey_shift=="yes"&&holdingKey_e=="yes"){if(actualPageCanAdmin=="YES")window.location='http://'+actualSiteUrl+'/index.php?pageId='+actualPageId+'&edit=1';holdingKey_e="no";holdingKey_shift="no";}}
function resizeMainWrap(){if(parseInt(navigator.appVersion)>3){if(navigator.appName=="Netscape"){var winW=window.innerWidth;var winH=window.innerHeight;}
else if(navigator.appName.indexOf("Microsoft")!=-1){var winW=document.body.offsetWidth-10;var winH=document.body.offsetHeight-10;}
if(document.getElementById('left_index_td'))var leftWidth=document.getElementById('left_index_td').offsetWidth;else var leftWidth=0;if(document.getElementById('right_index_td'))var rightWidth=document.getElementById('right_index_td').offsetWidth;else var rightWidth=0;var centerWidth=winW-leftWidth-rightWidth;document.getElementById('whole_page').style.width=centerWidth;if(document.getElementById('index_height_set'))var topHeight=document.getElementById('index_height_set').offsetHeight;else var topHeight=0;var centerHeight=winH-topHeight;document.getElementById('whole_page').style.height=centerHeight;if(document.getElementById('left_index_div'))document.getElementById('left_index_div').style.height=centerHeight;if(document.getElementById('right_index_div'))document.getElementById('right_index_div').style.height=centerHeight;}}
function checkOnKeyUpMustBeNumber(myVal,myId,myAlertMessage){if(isNumeric(myVal)==false){document.getElementById(myId).value=myVal.substr(0,myVal.length-1);}}
function implode(glue,pieces){return((pieces instanceof Array)?pieces.join(glue):pieces);}
function closeThisWindow(){window.close();}
function popupPrintThisPage(mydDivId){var el=document.getElementById(mydDivId);var myContent=el.innerHTML;myContent=myContent.replace(/&/g,'__ANDTAG__');myContentEx=myContent.split(' ');var contentSplit='';for(var i=0;i<myContentEx.length;i++){contentSplit=contentSplit+'&content['+i+']='+myContentEx[i];}
var myBackground=el.style.backgroundColor;var myColor=el.style.color;while(myBackground==""||myBackground=="transparent"){el=el.parentNode;myBackground=el.style.backgroundColor;if(myBackground!="")myColor=el.style.color;if(el.nodeName=="body")break;}
ajax.replace('index.php','ajaxActions_div','post','ajaxAction=system/print.php&keepPostsIntegrality=1&color='+myColor+'&bgcolor='+myBackground+'&action=printthispage'+contentSplit,doNothing,openPrintThispage);}
function openPrintThispage(){window.open("index.php?blank_popup=system/print.php&action=printthispage","printThisPage","status=0,toolbar=0,location=0, menubar=0, directories=0, resizable=1, scrollbars=1, height=600, width=800");}
function sk_emoticonToAdd(){openModalWindow_sk('','Fermer',775,420);ajax.replace('index.php','modalWindowContentWrapper_'+numberModalWindowOpen,'post','ajaxAction=client_file/ajax_actions.php&action=addSomeSmiley');}
function sk_emoticonToAdd_addFilename(thisFilename){var content=tinyMCE.get('addforumpost_description').getContent();tinyMCE.execCommand('mceSetContent',false,content+'<img src="'+thisFilename+'" alt="smiley" />');closeModalWindow_sk();}
function alertAllEditorIDs(){var IDs=new Array();var editorID;for(editorID in tinyMCE.editors){IDs[IDs.length]=editorID;};alert("All editor IDs:\n"+IDs);}
function changeProvinceForSelectedCountry(countryId,targetId){voidfunction.ajax.request('index.php',changeProvinceForSelectedCountry_callBack,'post','ajaxAction=ajax_actions.php&action=changeProvinceForSelectedCountry&countryId='+countryId+'&targetId='+targetId);}
function changeProvinceForSelectedCountry_callBack(info){info=eval('['+info+']')[0];document.getElementById(info["targetId"]).options.length=0;if(info["options"].length<=0)document.getElementById(info["targetId"]).options[0]=new Option('Aucune','0');else{for(var i=0;i<=info["options"].length;i++){document.getElementById(info["targetId"]).options[i]=new Option(info["options"][i][0],info["options"][i][1]);}}}
var isIE=(document.all)?true:false;function setModalWindow(el,options){if(options==undefined)options={top:"center",left:"center"};if(typeof(el)=='string')el=document.getElementById(el);if(el==null||typeof(el)!='object')return false;setFadeWindow();var scroll=getScrollOffset();if(isIE==undefined||isIE==true){selectList=document.getElementsByTagName('select');selectException=el.getElementsByTagName('select');if(selectList){for(var i=0;i<selectList.length;i++){var select=selectList[i];if(select){select.oldVisibility=select.style.visibility;if(selectException.length==0||!in_array(selectException,select)){select.style.visibility='hidden';}}}}}
voidfunction.toggleOn(el);if(options.top=='center'){var size=getWindowSize();el.style.top=(((size.height/2)-(el.clientHeight/2))+scroll.top)+"px";}
if(options.left=='center'){var size=getWindowSize();el.style.left=(((size.width/2)-(el.clientWidth/2))+scroll.left)+"px";}
if(typeof(options.top)=='number'){el.style.top=(options.top+scroll.top)+"px";}
if(typeof(options.left)=='number'){el.style.left=(options.left+scroll.left)+"px";}}
function setFadeWindow(){var body=document.getElementsByTagName('body')[0];var fade=createFadeWindow();var scroll=getScrollOffset();fade.style.top=scroll.top+"px";fade.style.left=scroll.left+"px";body.appendChild(fade);body.style.overflow='hidden';}
function cancelModalWindow(el){var body=document.getElementsByTagName('body')[0];var fade=document.getElementById('ObjFadeWindow');body.removeChild(fade);body.style.overflow='';if(isIE==undefined||isIE){selectList=document.getElementsByTagName('select');for(var i=0;i<selectList.length;i++){var select=selectList[i];select.style.visibility=select.oldVisibility;}}
if(el!=undefined){if(typeof(el)=="string")el=document.getElementById(el);if(typeof(el)=="object"){voidfunction.toggleOff(el);}}}
function createFadeWindow(){var fade=document.getElementById('ObjFadeWindow');if(fade!=null&&typeof(fade)=='object')return fade;fade=document.createElement("div");fade.id="ObjFadeWindow";fade.style.position="absolute";fade.style.top="0px";fade.style.left="0px";fade.style.width="100%";fade.style.height="100%";fade.style.backgroundColor="#b3b3b3";fade.style.backgroundColor="#000";fade.style.cursor="not-allowed";fade.style.filter="Alpha(Opacity=50)";fade.style.opacity="0.50";fade.style.zIndex="99";return fade;}
Array.prototype.inArray=function(value,strict){var i=0;var len=this.length;for(i=0;i<len;i++){if((this[i]===value&&strict==true)||(this[i]==value&&strict!=true)){return true;}}
return false;}
Array.prototype.in_array=Array.prototype.inArray;function in_array(haystack,needle,strict){if(typeof(haystack)=='array')return haystack.in_array(needle,strict);var len=haystack.length;for(var i=0;i<len;i++){if((haystack[i]===needle&&strict==true)||(haystack[i]==needle&&strict!=true)){return true;}}
return false;}
var actionStack=new Array();var actionStackCount=0;var backActionStackCount=0;var editorTextAreaHasFocus=0;function showHideSmileyBar(whichBar){document.getElementById('smileyPage_1').style.display='none';document.getElementById('smileyPage_2').style.display='none';document.getElementById('smileyPage_3').style.display='none';document.getElementById('smileyPage_'+whichBar).style.display='';}
function editorUndoButton(){if(backActionStackCount>0){backActionStackCount=backActionStackCount-1;var text=actionStack[backActionStackCount];document.getElementById('editorTextArea').value=text;document.getElementById('editorArea1').innerHTML=skEditorConvert_Tag_2_Code(text);}
else alert('Can not undo anymore.');}
function editorRedoButton(){backActionStackCount++;if(backActionStackCount>0&&backActionStackCount<=actionStackCount){var text=actionStack[backActionStackCount];document.getElementById('editorTextArea').value=text;document.getElementById('editorArea1').innerHTML=skEditorConvert_Tag_2_Code(text);}
else{alert('Can not go further then where you were at.');backActionStackCount=parseInt(backActionStackCount-1);}}
function sk_editor_itemClick(whichClick){var taId=document.getElementById('editorTextArea');if(document.selection){var selectedText=(document.all)?document.selection.createRange().text:document.getSelection();if(selectedText==""){if(whichClick=="link")selectedText=document.getElementById('linkName').value;var textBefore=(taId.value).substring(0);var textAfter="";}
else{var textBefore=(taId.value).substring(0,document.getElementById('editorTextArea').value.indexOf(selectedText));var textAfter=(taId.value).substring(parseInt(document.getElementById('editorTextArea').value.indexOf(selectedText)+selectedText.length));}}
else{var textBefore=(taId.value).substring(0,taId.selectionStart);var selectedText=(taId.value).substring(taId.selectionStart,taId.selectionEnd);var textAfter=(taId.value).substring(taId.selectionEnd);}
var originalSelection=selectedText;var originalSelection=selectedText;var text=textBefore+selectedText+textAfter;if(backActionStackCount==0)actionStack[backActionStackCount]=text;if(whichClick.substring(0,6)=="colums"){var columnsAr=new Array("[_colums2a_]","[_colums2b_]","[_colums3a_]","[_colums3b_]","[_colums4a_]","[_colums4b_]","[_columsC_]");var columnsAr2=new Array(""," ",""," ",""," ","");for(var i=0;i<columnsAr.length;i++){var newSplit=selectedText.split(columnsAr[i]);for(var ii=0;ii<newSplit.length;ii++){selectedText=selectedText.replace(columnsAr[i],columnsAr2[i]);}}}
if(whichClick=="colums1")showHide('editorColumSelector');else if(whichClick=="colums2"){var myLength=selectedText.length;var myLengthCut=Math.floor(myLength/2);var firstHalf=selectedText.substring(0,myLengthCut);var lastSpacerPos=firstHalf.lastIndexOf(" ");firstHalf=selectedText.substring(0,lastSpacerPos);var lastHalf=selectedText.substring(lastSpacerPos+1);var selectedText='[_colums2a_]'+firstHalf+'[_colums2b_]'+lastHalf+'[_columsC_]';showHide('editorColumSelector');}
else if(whichClick=="colums3"){var myLength=selectedText.length;var myLengthCut=Math.floor(myLength/3);var firstHalf=selectedText.substring(0,myLengthCut);var lastSpacerPos1=firstHalf.lastIndexOf(" ");firstHalf=selectedText.substring(0,lastSpacerPos1);var secondHalf=selectedText.substring(lastSpacerPos1,parseInt(lastSpacerPos1+myLengthCut));var lastSpacerPos2=secondHalf.lastIndexOf(" ");secondHalf=secondHalf.substring(0,lastSpacerPos2);var lastHalf=selectedText.substring(parseInt(lastSpacerPos1+lastSpacerPos2+1));var selectedText='[_colums3a_]'+firstHalf+'[_colums3b_]'+secondHalf+'[_colums3b_]'+lastHalf+'[_columsC_]';showHide('editorColumSelector');}
else if(whichClick=="colums4"){var myLength=selectedText.length;var myLengthCut=Math.floor(myLength/4);var firstHalf=selectedText.substring(0,myLengthCut);var lastSpacerPos1=firstHalf.lastIndexOf(" ");firstHalf=selectedText.substring(0,lastSpacerPos1);var secondHalf=selectedText.substring(lastSpacerPos1,parseInt(lastSpacerPos1+myLengthCut));var lastSpacerPos2=secondHalf.lastIndexOf(" ");secondHalf=secondHalf.substring(0,lastSpacerPos2);var thirdHalf=selectedText.substring(parseInt(lastSpacerPos1+lastSpacerPos2+1),parseInt(lastSpacerPos1+lastSpacerPos2+myLengthCut));var lastSpacerPos3=thirdHalf.lastIndexOf(" ");thirdHalf=thirdHalf.substring(0,lastSpacerPos3);var lastHalf=selectedText.substring(parseInt(lastSpacerPos1+lastSpacerPos2+lastSpacerPos3+1));var selectedText='[_colums4a_]'+firstHalf+'[_colums4b_]'+secondHalf+'[_colums4b_]'+thirdHalf+'[_colums4b_]'+lastHalf+'[_columsC_]';showHide('editorColumSelector');}
else if(whichClick.substring(0,11)=="fontfamily_"){selectedText='[_fontfamilyA_]'+whichClick.substring(11)+'[_fontfamilyB_]'+selectedText+'[__fontfamily__]';document.getElementById('fontfamily').value='';}
else if(whichClick=="fieldset"){var allValue=new Array();allValue[0]=document.getElementById('fieldsetTitle').value;allValue[1]=document.getElementById('fieldsetText').value;selectedText='[_fiedlsetB_]'+allValue[0]+'[_fieldsetL_]'+allValue[1]+'[__fieldset__]';document.getElementById('fieldsetTitle').value='';document.getElementById('fieldsetText').value='';showHide('editorFieldset');}
else if(whichClick=="link"){var allValue=new Array();allValue[0]=document.getElementById('linkURL').value;allValue[1]=document.getElementById('linkName').value;allValue[2]=document.getElementById('linkInNewWindow').value;if(allValue[0].indexOf('@')>0)selectedText='[_linkM_]'+allValue[0]+'[_link_]'+allValue[1]+'[__link__]';else{if(allValue[0].substring(0,7)=='http://')allValue[0]=allValue[0].substring(7);if(document.getElementById('linkInNewWindow').checked==true)selectedText='[_linkU_]http://'+allValue[0]+'[_linkNP_]'+allValue[1]+'[__link__]';else selectedText='[_linkU_]http://'+allValue[0]+'[_link_]'+allValue[1]+'[__link__]';}
document.getElementById('linkURL').value='';document.getElementById('linkName').value='';document.getElementById('linkInNewWindow').checked=true;showHide('editorLinkSelector');}
else if(whichClick=="image"){var allValue=new Array();allValue[0]=document.getElementById('imageURL').value;allValue[1]=document.getElementById('imgWidthB').value;allValue[2]=document.getElementById('imgHeightB').value;if(allValue[0].substring(0,7)=='http://')allValue[0]=allValue[0].substring(7);var NEWselectedText='[_image_]http://'+allValue[0]+'[_imageA_]';if(allValue[1]>0&&document.getElementById('imgConsProp').checked==true)NEWselectedText+='[_imageW_]'+allValue[2]+'[_imageA_]';else if(allValue[1]>0&&allValue[2]>0&&document.getElementById('imgConsProp').checked==false)NEWselectedText+='[_imageW_]'+allValue[1]+'[_imageA_][_imageH_]'+allValue[2]+'[_imageA_]';else if(document.getElementById('imgConsProp').checked==false){if(allValue[1]>0)NEWselectedText+='[_imageW_]'+allValue[1]+'[_imageA_]';if(allValue[2]>0)NEWselectedText+='[_imageH_]'+allValue[2]+'[_imageA_]';}
NEWselectedText+='[__image__]';if(document.getElementById('linkImage').checked==true)NEWselectedText='[_linkU_]http://'+allValue[0]+'[_linkNP_]'+NEWselectedText+'[__link__]';selectedText+=NEWselectedText;document.getElementById('imageURL').value='http://';document.getElementById('imgWidthA').checked=true;document.getElementById('imgWidthB').value=0;document.getElementById('imgHeightA').checked=true;document.getElementById('imgHeightB').value=0;document.getElementById('imgConsProp').checked=true;document.getElementById('linkImage').checked=true;showHide('editorImageSelector');}
else if(whichClick.substring(0,9)=="table"){var allValue=new Array();if(document.getElementById('numRows').value>0)allValue[0]=document.getElementById('numRows').value;else allValue[0]=1;if(document.getElementById('numCols').value>0)allValue[1]=document.getElementById('numCols').value;else allValue[1]=1;allValue[2]=document.getElementById('cellSpacing').value;allValue[3]=document.getElementById('cellPadding').value;allValue[4]=document.getElementById('borderThickness').value;allValue[5]=document.getElementById('borderColor').value;selectedText+='\r\n[_table_][_tableCS_]'+allValue[2]+'[__tableB__][_tableCP_]'+allValue[3]+'[__tableB__][_tableBT_]'+allValue[4]+'[__tableB__]';if(allValue[5].substring(0,1)=='#')selectedText+='[_tableBC_]'+allValue[5]+'[__tableB__]';selectedText+='[_tableA_]';for(var i=0;i<allValue[0];i++){selectedText+='[_tr_]';var colii=0;var rowi=0;for(var ii=0;ii<allValue[1];ii++){colii=ii+1;rowi=i+1;selectedText+='\r\n[_td_]==== TEXT ROW '+rowi+', COLUMN '+colii+' ====[__td__]';}
selectedText+='\r\n[__tr__]';}
selectedText+='[__table__]';showHide('editorTableSelector');}
else if(whichClick.substring(0,9)=="fontsize_"){selectedText='[_fontsizeA_]'+whichClick.substring(9)+'[_fontsizeB_]'+selectedText+'[__fontsize__]';document.getElementById('fontsize').value='';}
else if(whichClick.substring(0,10)=="textcolor_"){selectedText='[_textcolorA_]'+whichClick.substring(10)+'[_textcolorB_]'+selectedText+'[__textcolor__]';document.getElementById('textcolor').value='';}
else if(whichClick.substring(0,16)=="backgroundcolor_"){selectedText='[_backgroundcolorA_]'+whichClick.substring(16)+'[_backgroundcolorB_]'+selectedText+'[__backgroundcolor__]';document.getElementById('backgroundcolor').value='';}
else if(whichClick.substring(0,7)=="smiley_"){selectedText='[_smiley_]'+whichClick.substring(7)+'[__smiley__]';}
else if(whichClick.substring(0,12)=="more_smiley_"){selectedText='[_smiley_]'+whichClick.substring(12)+'[__smiley__]';showHide('smileyBox_01');showHide('editorBox_01');}
else selectedText='[_'+whichClick+'_]'+selectedText+'[__'+whichClick+'__]';text=textBefore+selectedText+textAfter;document.getElementById('editorTextArea').value=text;document.getElementById('editorArea1').innerHTML=skEditorConvert_Tag_2_Code(text);backActionStackCount++;actionStackCount=backActionStackCount;actionStack[backActionStackCount]=text;document.getElementById('editorTextArea').focus();if(document.selection){}
else{taId.selectionStart=textBefore.length;taId.selectionEnd=textBefore.length+selectedText.length;}}
function skEditorConvert_Tag_2_Code(text){for(var i=0;i<listSimpleTags.length;i++){var newSplit=text.split(listSimpleTags[i]);for(var ii=0;ii<newSplit.length;ii++){text=text.replace(listSimpleTags[i],listToReplaceBy[i]);}}
var textS=text.split("\n");var margeThis='';text='';for(var ii=0;ii<textS.length;ii++){text+='<br/>'+textS[ii];}
var posDouble=text.indexOf("</span></span>");if(posDouble>0)text=removeDoubleSpan(text);return text;}
function removeDoubleSpan(text){var posDoubleSpan=text.indexOf("</span></span>");var firstPart=text.substring(0,posDoubleSpan+7);var lastPart=text.substring(posDoubleSpan+14);var beforeLastSpanPos=firstPart.lastIndexOf("<span");var beforeLastSpan=firstPart.substring(0,beforeLastSpanPos-2);var lastSpanPart=firstPart.substring(beforeLastSpanPos+13);text=beforeLastSpan+' '+lastSpanPart+lastPart;var posDoubleSpan2=text.indexOf("</span></span>");if(posDoubleSpan2>0)text=removeDoubleSpan(text);return text;}
var numColomnSelected=0;function columnSelector(bgColor,actWhat,meId){if(actWhat=="OVER"){if(meId==1){document.getElementById('columnSelectorImg1').style.backgroundColor=bgColor;document.getElementById('columnSelectorImg2').style.backgroundColor='';document.getElementById('columnSelectorImg3').style.backgroundColor='';document.getElementById('columnSelectorImg4').style.backgroundColor='';document.getElementById('editorColumSelectorNumber').innerHTML='1';}
else if(meId==2){document.getElementById('columnSelectorImg1').style.backgroundColor=bgColor;document.getElementById('columnSelectorImg2').style.backgroundColor=bgColor;document.getElementById('columnSelectorImg3').style.backgroundColor='';document.getElementById('columnSelectorImg4').style.backgroundColor='';document.getElementById('editorColumSelectorNumber').innerHTML='2';}
else if(meId==3){document.getElementById('columnSelectorImg1').style.backgroundColor=bgColor;document.getElementById('columnSelectorImg2').style.backgroundColor=bgColor;document.getElementById('columnSelectorImg3').style.backgroundColor=bgColor;document.getElementById('columnSelectorImg4').style.backgroundColor='';document.getElementById('editorColumSelectorNumber').innerHTML='3';}
else if(meId==4){document.getElementById('columnSelectorImg1').style.backgroundColor=bgColor;document.getElementById('columnSelectorImg2').style.backgroundColor=bgColor;document.getElementById('columnSelectorImg3').style.backgroundColor=bgColor;document.getElementById('columnSelectorImg4').style.backgroundColor=bgColor;document.getElementById('editorColumSelectorNumber').innerHTML='4';}}
else if(actWhat=="OUT"){}}
function editorTareaFocus(){var editorTextAreaHasFocus=1;document.getElementById('editorFieldset').style.display="none";document.getElementById('editorImageSelector').style.display="none";document.getElementById('editorTableSelector').style.display="none";document.getElementById('editorColumSelector').style.display="none";document.getElementById('editorLinkSelector').style.display="none";}
function autoValueForNewItem(nVal){var taId=document.getElementById('editorTextArea');if(document.selection)var selectedText=(document.all)?document.selection.createRange().text:document.getSelection();else var selectedText=(taId.value).substring(taId.selectionStart,taId.selectionEnd);if(nVal==1)document.getElementById('fieldsetText').value=selectedText;else if(nVal==2){if(selectedText.indexOf('@')>0)document.getElementById('linkURL').value=selectedText;else{var isUrlFound=0;var urlExplode=selectedText.split('.');if(selectedText.substring(0,7)=='http://'||selectedText.substring(0,5)=='fttp:'||selectedText.substring(0,3)=='ftp'||urlExplode[0]=='http://www'||urlExplode[0]=='www')isUrlFound=1;else{var lastDot=selectedText.lastIndexOf(".");if(lastDot>0){var urlExtension=selectedText.substring(lastDot);if(checkIfAZaz09_straight(urlExtension.substring(1)))isUrlFound=1;}}
if(isUrlFound==1){document.getElementById('linkURL').value=selectedText;document.getElementById('linkName').value=selectedText;}
else document.getElementById('linkName').value=selectedText;}}}
function openAdvancedEditor(fieldName){var areaText=document.getElementById('editor_textareacontent_'+fieldName).value;areaText=areaText.replace(/&/g,'_QSAND_');document.getElementById('advanced_editor_'+fieldName).innerHTML='<img src="images/ajax-loader.gif" alt="image" width="50" />';ajax.replace('index.php','advanced_editor_'+fieldName,'POST','ajaxAction=modules/system_editor/editor.php&areaValue='+fieldName+'&defaultValue='+areaText);}
function doNothing(){}
function ajaxObject(maxSumiltaniousConnectionParam){this.ajaxRequestArray=new Array();this.requestWaitList=new Array();this.async=true;this.maxSumiltaniousConnection=maxSumiltaniousConnectionParam;if(maxSumiltaniousConnectionParam==undefined){this.maxSumiltaniousConnection=10;}
this.replace=function(url,id,method,arg,loadingFunc,loadedFunc){var validate=document.getElementById(id);if(validate!=null){if(typeof(validate.innerHTML)!=undefined){this.request(url,id,method,arg,loadingFunc,loadedFunc);}}
else{this.callError(1,"replace ID is not valid",true);}}
this.request=function(url,callback,method,arg,loadingFunc,loadedFunc,replaceId){if(replaceId!=undefined){callback=replaceId;this.callError(-1,"Parameter replaceId should not be used anymore, use the callback parameter (2) with the Id to be replaced instead.",true);}
method=method.toLowerCase();if(url==""||url==undefined){alert("URL function must be provided");return false;}
else if(callback==""||callback==undefined&&callback!=null){alert("Callback function must be provided");return false;}
else if(method!="post"&&method!="get"){alert("Method function must be provided and be POST or GET only");return false;}
var innerCallback=callback;var innerLoadingFunc=loadingFunc;var innerLoadedFunc=loadedFunc;var httpRequest=this.getHttpRequest();if(httpRequest&&(httpRequest.readyState==4||httpRequest.readyState==0)){try{if(typeof(innerLoadingFunc)=="function"){innerLoadingFunc();}
else if(typeof(innerLoadingFunc)=="object"&&typeof(innerLoadingFunc.loading)=="function"){innerLoadingFunc.loading(innerLoadingFunc.param);}
else if(typeof(outterLoadingFunc)=="function"){outterLoadingFunc(innerLoadingFunc);}
if(method=="get"){arg+="&IECacheProblem="+IECacheFix_getTime();var urlComplete=url;if(arg!=undefined){urlComplete+='?'+arg;}
httpRequest.open("get",urlComplete,this.async);var readystatechange=getHandleStateChange(this)
httpRequest.onreadystatechange=readystatechange;httpRequest.send(' ');if(!this.async)
readystatechange();}
else{httpRequest.open("post",url,this.async);httpRequest.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset="+this.encoding);var readystatechange=getHandleStateChange(this)
httpRequest.onreadystatechange=readystatechange;if(arg==""||arg==undefined){arg="IECacheProblem="+IECacheFix_getTime();}
httpRequest.send(arg);if(!this.async)
readystatechange();}}
catch(e){this.callError(2,"An exception occurred in the script. Error name: "+e.name+". Error message: "+e.message,true);}}
else{this.requestWaitList.push(new Array(url,callback,method,arg,loadingFunc,loadedFunc));}
function getHandleStateChange(thisAjax){function handleStateChange(){if(httpRequest.readyState==4){if(httpRequest.status==200){if(typeof(innerCallback)=="function"){xmlResponse=httpRequest.responseXML;if(!xmlResponse||!xmlResponse.documentElement){thisAjax.callError(5,'AJAX Object reports: no XML returned or IE and Opera error',false);xmlResponse=false;}
if(xmlResponse.documentElement&&xmlResponse.documentElement.nodeName=='parseerror'){thisAjax.callError(6,'AJAX Object reports: no XML returned or Firefox and Opera error',false);xmlResponse=false;}
if(typeof(innerLoadedFunc)=="function"){innerLoadedFunc();}
else if(typeof(innerLoadedFunc)=="object"&&typeof(innerLoadedFunc.loaded)=="function"){innerLoadedFunc.loaded(innerLoadedFunc.param);}
else if(typeof(innerLoadingFunc)=="object"&&typeof(innerLoadingFunc.loaded)=="function"){innerLoadingFunc.loaded(innerLoadingFunc.param);}
else if(typeof(outterLoadedFunc)=="function"){outterLoadedFunc(innerLoadedFunc);}
var text=httpRequest.responseText;var xml=xmlResponse;innerCallback(httpRequest.responseText,xmlResponse);}
else{var text=httpRequest.responseText;if(typeof(innerLoadedFunc)=="function"){innerLoadedFunc();}
else if(typeof(innerLoadedFunc)=="object"&&typeof(innerLoadedFunc.loaded)=="function"){innerLoadedFunc.loaded(innerLoadedFunc.param);}
else if(typeof(innerLoadingFunc)=="object"&&typeof(innerLoadingFunc.loaded)=="function"){innerLoadingFunc.loaded(innerLoadingFunc.param);}
else if(typeof(outterLoadedFunc)=="function"){outterLoadedFunc(innerLoadedFunc);}
var r=document.getElementById(innerCallback);if(r){r.innerHTML=text;}}}
else{if(JS_NOWVIEW_LANGUAGE=="French")var errorMsg='Veuillez patienter, une action est en traitement.';else var errorMsg='Please wait, an action is in process.';}
if(thisAjax.requestWaitList.length>0){arg=thisAjax.requestWaitList.shift();thisAjax.request(arg[0],arg[1],arg[2],arg[3],arg[4],arg[5]);}}}
return handleStateChange;}
return true;}
this.getHttpRequest=function(){var httpRequest=undefined;for(i=0;i<this.ajaxRequestArray.length;i++){if(this.ajaxRequestArray[i].readyState==4||this.ajaxRequestArray[i].readyState==0){httpRequest=this.ajaxRequestArray[i];break;}}
if(httpRequest==undefined&&this.ajaxRequestArray.length<this.maxSumiltaniousConnection){try{httpRequest=new XMLHttpRequest();}catch(e){var xmlHttpVersion=new Array("Msxml2.XMLHTTP.6.0","Msxml2.XMLHTTP.5.0","Msxml2.XMLHTTP.4.0","Msxml2.XMLHTTP.3.0","Msxml2.XMLHTTP","Microsoft.XMLHTTP");for(var i=0;i<xmlHttpVersion.length&&!httpRequest;i++){try{httpRequest=new ActiveXObject(xmlHttpVersion[i]);}catch(e){}}}
var nextIndex=this.ajaxRequestArray.length;this.ajaxRequestArray[nextIndex]=httpRequest;}
return httpRequest;}
var outterLoadingFunc='';var outterLoadedFunc='';this.setLoadingFunction=function(callback){outterLoadingFunc=callback;}
this.setLoadedFunction=function(callback){outterLoadedFunc=callback;}
var errorCallback='';var lastError=new Array(0,'');this.setErrorCallback=function(callback){errorCallback=callback;}
this.callError=function(errCode,errMsg,show){lastError=new Array(errCode,errMsg);if(typeof(errorCallback)=="function"){errorCallback(errMsg,errCode);}
else if(show==true){alert(errMsg);}}
this.getLastError=function(){return lastError;}
this.cleanWaitList=function(url){if(url==undefined||url==""){this.requestWaitList=new Array();}
else{function removeFrom(arr,url){var r=new Array;for(var i=0;i<arr.length;i++){if(arr[i][0]!=url){r.push(arr[i]);}}
return r;}
this.requestWaitList=removeFrom(this.requestWaitList,url);}}
this.encoding='iso-8859-1';this.setEncoding=function(newCharset){var old=this.encoding;this.encoding=newCharset;return old;}
this.setAsync=function(newValue){this.async=newValue;}
this.formToUrl=function(formId){return this.formToUrlArguments(formId);}
this.formToUrlArgument=function(formId){return this.formToUrlArguments(formId);}
this.formToUrlArguments=function(formId){var form=false;if(typeof(formId)=="object"){form=formId;}
else{form=document.getElementById(formId);}
if(form!=null&&typeof(form)=="object"&&form.tagName.toLowerCase()=="form"){var r="";var nbFormElements=form.elements.length;for(var iFormElements=0;iFormElements<nbFormElements;iFormElements++){var formElement=form.elements[iFormElements];if(formElement.name!=""&&formElement.disabled==false){if(formElement.type=="text"||formElement.type=="hidden"||formElement.type=="password"||formElement.type=="textarea"||formElement.type=="select-one"){r+=encodeURIComponent(formElement.name)+"="+encodeURIComponent(formElement.value)+"&";}
else if(formElement.type=="checkbox"){r+=encodeURIComponent(formElement.name)+"=";if(formElement.checked==true){r+=encodeURIComponent(formElement.value)+"&";}
r+="&"}
else if(formElement.type=="radio"&&formElement.checked){r+=encodeURIComponent(formElement.name)+"=";r+=encodeURIComponent(formElement.value)+"&";}
else if(formElement.type=="select-multiple"){var nb=formElement.options.length;for(var i=0;i<nb;i++){if(formElement.options[i].selected==true){if(formElement.name.lastIndexOf('[]')==formElement.name.length-2){r+=encodeURIComponent(formElement.name)+"="+encodeURIComponent(formElement.options[i].value)+"&";}
else{r+=encodeURIComponent(formElement.name)+"[]="+encodeURIComponent(formElement.options[i].value)+"&";}}
if(i>100){alert('bug!!!!');break;}}}
else if(formElement.type=="file"){}}}
return r;}
else{this.callError(4,"The argument passed to formToUrlArguments function is not a form ID or a form object",true);}
return false;}
return this;}
function IECacheFix_getTime(){var d=new Date();return d.getTime();}
var isIE=(navigator.appVersion.indexOf("MSIE")!=-1)?true:false;var isWin=(navigator.appVersion.toLowerCase().indexOf("win")!=-1)?true:false;var isOpera=(navigator.userAgent.indexOf("Opera")!=-1)?true:false;function ap_stopAll(){}
function ControlVersion()
{var version;var axo;var e;try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");version=axo.GetVariable("$version");}catch(e){}
if(!version)
{try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");version="WIN 6,0,21,0";axo.AllowScriptAccess="always";version=axo.GetVariable("$version");}catch(e){}}
if(!version)
{try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");version=axo.GetVariable("$version");}catch(e){}}
if(!version)
{try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");version="WIN 3,0,18,0";}catch(e){}}
if(!version)
{try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");version="WIN 2,0,0,11";}catch(e){version=-1;}}
return version;}
function GetSwfVer(){var flashVer=-1;if(navigator.plugins!=null&&navigator.plugins.length>0){if(navigator.plugins["Shockwave Flash 2.0"]||navigator.plugins["Shockwave Flash"]){var swVer2=navigator.plugins["Shockwave Flash 2.0"]?" 2.0":"";var flashDescription=navigator.plugins["Shockwave Flash"+swVer2].description;var descArray=flashDescription.split(" ");var tempArrayMajor=descArray[2].split(".");var versionMajor=tempArrayMajor[0];var versionMinor=tempArrayMajor[1];var versionRevision=descArray[3];if(versionRevision==""){versionRevision=descArray[4];}
if(versionRevision[0]=="d"){versionRevision=versionRevision.substring(1);}else if(versionRevision[0]=="r"){versionRevision=versionRevision.substring(1);if(versionRevision.indexOf("d")>0){versionRevision=versionRevision.substring(0,versionRevision.indexOf("d"));}}
var flashVer=versionMajor+"."+versionMinor+"."+versionRevision;}}
else if(navigator.userAgent.toLowerCase().indexOf("webtv/2.6")!=-1)flashVer=4;else if(navigator.userAgent.toLowerCase().indexOf("webtv/2.5")!=-1)flashVer=3;else if(navigator.userAgent.toLowerCase().indexOf("webtv")!=-1)flashVer=2;else if(isIE&&isWin&&!isOpera){flashVer=ControlVersion();}
return flashVer;}
function DetectFlashVer(reqMajorVer,reqMinorVer,reqRevision)
{versionStr=GetSwfVer();if(versionStr==-1){return false;}else if(versionStr!=0){if(isIE&&isWin&&!isOpera){tempArray=versionStr.split(" ");tempString=tempArray[1];versionArray=tempString.split(",");}else{versionArray=versionStr.split(".");}
var versionMajor=versionArray[0];var versionMinor=versionArray[1];var versionRevision=versionArray[2];if(versionMajor>parseFloat(reqMajorVer)){return true;}else if(versionMajor==parseFloat(reqMajorVer)){if(versionMinor>parseFloat(reqMinorVer))
return true;else if(versionMinor==parseFloat(reqMinorVer)){if(versionRevision>=parseFloat(reqRevision))
return true;}}
return false;}}
function AC_AddExtension(src,ext)
{if(src.indexOf('?')!=-1)
return src.replace(/\?/,ext+'?');else
return src+ext;}
function AC_Generateobj(objAttrs,params,embedAttrs)
{var str='';if(isIE&&isWin&&!isOpera)
{str+='<object ';for(var i in objAttrs)
{str+=i+'="'+objAttrs[i]+'" ';}
str+='>';for(var i in params)
{str+='<param name="'+i+'" value="'+params[i]+'" /> ';}
str+='</object>';}
else
{str+='<embed ';for(var i in embedAttrs)
{str+=i+'="'+embedAttrs[i]+'" ';}
str+='> </embed>';}
document.write(str);}
function AC_FL_RunContent(){var ret=AC_GetArgs
(arguments,".swf","movie","clsid:d27cdb6e-ae6d-11cf-96b8-444553540000","application/x-shockwave-flash");AC_Generateobj(ret.objAttrs,ret.params,ret.embedAttrs);}
function AC_SW_RunContent(){var ret=AC_GetArgs
(arguments,".dcr","src","clsid:166B1BCA-3F9C-11CF-8075-444553540000",null);AC_Generateobj(ret.objAttrs,ret.params,ret.embedAttrs);}
function AC_GetArgs(args,ext,srcParamName,classid,mimeType){var ret=new Object();ret.embedAttrs=new Object();ret.params=new Object();ret.objAttrs=new Object();for(var i=0;i<args.length;i=i+2){var currArg=args[i].toLowerCase();switch(currArg){case"classid":break;case"pluginspage":ret.embedAttrs[args[i]]=args[i+1];break;case"src":case"movie":args[i+1]=AC_AddExtension(args[i+1],ext);ret.embedAttrs["src"]=args[i+1];ret.params[srcParamName]=args[i+1];break;case"onafterupdate":case"onbeforeupdate":case"onblur":case"oncellchange":case"onclick":case"ondblClick":case"ondrag":case"ondragend":case"ondragenter":case"ondragleave":case"ondragover":case"ondrop":case"onfinish":case"onfocus":case"onhelp":case"onmousedown":case"onmouseup":case"onmouseover":case"onmousemove":case"onmouseout":case"onkeypress":case"onkeydown":case"onkeyup":case"onload":case"onlosecapture":case"onpropertychange":case"onreadystatechange":case"onrowsdelete":case"onrowenter":case"onrowexit":case"onrowsinserted":case"onstart":case"onscroll":case"onbeforeeditfocus":case"onactivate":case"onbeforedeactivate":case"ondeactivate":case"type":case"codebase":case"id":ret.objAttrs[args[i]]=args[i+1];break;case"width":case"height":case"align":case"vspace":case"hspace":case"class":case"title":case"accesskey":case"name":case"tabindex":ret.embedAttrs[args[i]]=ret.objAttrs[args[i]]=args[i+1];break;default:ret.embedAttrs[args[i]]=ret.params[args[i]]=args[i+1];}}
ret.objAttrs["classid"]=classid;if(mimeType)ret.embedAttrs["type"]=mimeType;return ret;}
function selectAllCheckboxById(id,start,end){for(var i=start;i<=end;i++){var name=document.getElementById(id+'_'+i).name;selectAllCheckbox(name);}}
function unselectAllCheckboxById(id,start,end){for(var i=start;i<=end;i++){var name=document.getElementById(id+'_'+i).name;unselectAllCheckbox(name);}}
function selectAllCheckbox(name){all=document.getElementsByName(name);for(var i=0;i<all.length;i++){input=all[i];if(input.type=="checkbox"){if(input.old_checked==undefined){input.old_checked=input.checked;}
input.checked=true;}}}
function unselectAllCheckbox(name){all=document.getElementsByName(name);for(var i=0;i<all.length;i++){input=all[i];if(input.type=="checkbox"){if(input.old_checked==undefined)
input.old_checked=input.checked;input.checked=false;}}}
function restoreAllCheckbox(name){all=document.getElementsByName(name);for(var i=0;i<all.length;i++){input=all[i];if(input.type=="checkbox"){if(input.old_checked!=undefined)
input.checked=input.old_checked;}}}
var htmlEntitiesEncoded=new Array('&nbsp;','&iexcl;','&cent;','&pound;','&curren;','&yen;','&brvbar;','&sect;','&uml;','&copy;','&ordf;','&laquo;','&not;','&shy;','&reg;','&macr;','&deg;','&plusmn;','&sup2;','&sup3;','&acute;','&micro;','&para;','&middot;','&cedil;','&sup1;','&ordm;','&raquo;','&frac14;','&frac12;','&frac34;','&iquest;','&Agrave;','&Aacute;','&Acirc;','&Atilde;','&Auml;','&Aring;','&AElig;','&Ccedil;','&Egrave;','&Eacute;','&Ecirc;','&Euml;','&Igrave;','&Iacute;','&Icirc;','&Iuml;','&ETH;','&Ntilde;','&Ograve;','&Oacute;','&Ocirc;','&Otilde;','&Ouml;','&times;','&Oslash;','&Ugrave;','&Uacute;','&Ucirc;','&Uuml;','&Yacute;','&THORN;','&szlig;','&agrave;','&aacute;','&acirc;','&atilde;','&auml;','&aring;','&aelig;','&ccedil;','&egrave;','&eacute;','&ecirc;','&euml;','&igrave;','&iacute;','&icirc;','&iuml;','&eth;','&ntilde;','&ograve;','&oacute;','&ocirc;','&otilde;','&ouml;','&divide;','&oslash;','&ugrave;','&uacute;','&ucirc;','&uuml;','&yacute;','&thorn;','&yuml;','&quot;','&lt;','&gt;');var htmlEntitiesDecoded=new Array(' ','¡','¢','£','¤','¥','¦','§','¨','©','ª','«','¬','­','®','¯','°','±','²','³','´','µ','¶','·','¸','¹','º','»','¼','½','¾','¿','À','Á','Â','Ã','Ä','Å','Æ','Ç','È','É','Ê','Ë','Ì','Í','Î','Ï','Ð','Ñ','Ò','Ó','Ô','Õ','Ö','×','Ø','Ù','Ú','Û','Ü','Ý','Þ','ß','à','á','â','ã','ä','å','æ','ç','è','é','ê','ë','ì','í','î','ï','ð','ñ','ò','ó','ô','õ','ö','÷','ø','ù','ú','û','ü','ý','þ','ÿ','"','<','>');function str_htmlEntitiesDecode(){str=this.toString();str=str.replace("&amp;","&");for(var i=0;i<htmlEntitiesEncoded.length;i++){var search=new RegExp(htmlEntitiesEncoded[i],'g');str=str.replace(search,htmlEntitiesDecoded[i]);}
return str;}
function str_htmlEntitiesEncode(){str=this.toString();str=str.replace(/&/g,"&amp;");for(var i=0;i<htmlEntitiesEncoded.length;i++){var search=new RegExp(htmlEntitiesDecoded[i],'g');str=str.replace(search,htmlEntitiesEncoded[i]);}
return str;}
String.prototype.htmlEntitiesDecode=str_htmlEntitiesDecode;String.prototype.htmlEntitiesEncode=str_htmlEntitiesEncode;var cvi_stactive,cvi_stpiece,snapfit={version:1.01,released:'2009-03-20 19:12:00',defaultSimple:false,defaultAreaborder:false,defaultSpace:0,defaultAreaopacity:0.33,defaultMixed:false,defaultAreaimage:false,defaultSnap:8,defaultBorderopacity:0.5,defaultFalsecolor:'#ff0000',defaultAreacolor:'#e0e0e0',defaultShadowopacity:0.75,defaultMatchcolor:'#00d000',defaultBgrndcolor:'#000000',defaultBorderwide:2,defaultLevel:3,defaultNokeys:false,defaultPolygon:false,add:function(image,options){if(image.tagName.toUpperCase()=="IMG"&&image.width>=128&&image.height>=128){function uniqueID(){var v=Date.parse(new Date())+Math.floor(Math.random()*100000000000);return v.toString(16);}
function hex2rgb(val){function h2d(v){return(Math.max(0,Math.min(parseInt(v,16),255)));}return h2d(val.substr(1,2))+','+h2d(val.substr(3,2))+','+h2d(val.substr(5,2));};function dec2hex(v){return'#'+v.toString(16)+v.toString(16)+v.toString(16);};var self,reso,imageWidth,imageHeight,isIE=0,defopts={"polygon":snapfit.defaultPolygon,"level":snapfit.defaultLevel,"space":snapfit.defaultSpace,"snap":snapfit.defaultSnap,"mixed":snapfit.defaultMixed,"simple":snapfit.defaultSimple,"nokeys":snapfit.defaultNokeys,"bcolor":snapfit.defaultBgrndcolor,"fcolor":snapfit.defaultFalsecolor,"mcolor":snapfit.defaultMatchcolor,"acolor":snapfit.defaultAreacolor,"aopacity":snapfit.defaultAreaopacity,"aborder":snapfit.defaultAreaborder,"aimage":snapfit.defaultAreaimage,"bopacity":snapfit.defaultBorderopacity,"bwide":snapfit.defaultBorderwide,"sopacity":snapfit.defaultShadowopacity};if(options){for(var i in defopts){if(!options[i]){options[i]=defopts[i];}}}else{options=defopts;}
imageWidth=('iwidth'in options)?parseInt(options.iwidth):image.width;imageHeight=('iheight'in options)?parseInt(options.iheight):image.height;if(document.all&&document.namespaces&&!window.opera){if(document.namespaces['v']==null){var e=["shape","shapetype","group","background","path","formulas","handles","fill","stroke","shadow","textbox","textpath","imagedata","line","polyline","curve","roundrect","oval","rect","arc","image"],s=document.createStyleSheet();for(var i=0;i<e.length;i++){s.addRule("v\\:"+e[i],"behavior: url(#default#VML);");}document.namespaces.add("v","urn:schemas-microsoft-com:vml");}var dpl=(image.currentStyle.display.toLowerCase()=='block')?'block':'inline-block';isIE=1;self=document.createElement(['<var unselectable="on" style="zoom:1;display:'+dpl+';overflow:hidden;width:'+imageWidth+'px;height:'+imageHeight+'px;padding:0px;">'].join(''));var flt=image.currentStyle.styleFloat.toLowerCase();self.dpl=(flt=='left'||flt=='right')?'inline':dpl;}else{self=document.createElement('canvas');reso=document.createElement('canvas');}
if((isIE&&self)||(reso&&self&&reso.getContext("2d")&&self.getContext("2d"))){self.id=(image.id=='undefined'||image.id==''?uniqueID():image.id);self.vml=isIE;self.alt=image.alt;self.title=image.title;self.img=image.src;self.className=image.className;self.style.cssText=image.style.cssText;self.style.height=imageHeight+'px';self.style.width=imageWidth+'px';self.height=imageHeight;self.width=imageWidth;self.sf=Math.min(1-Math.min((typeof options['space']==='number'?options['space']:snapfit.defaultSpace)*0.01,0.5),1.0);self.iw=parseInt(self.width*self.sf);self.ih=parseInt(self.height*self.sf);self.xo=parseInt((self.width-self.iw)/2);self.yo=parseInt((self.height-self.ih)/2);self.wk4=navigator.appVersion.indexOf('WebKit')!=-1&&!document.defaultCharset?1:0;self.ge8=navigator.userAgent.indexOf('Gecko')>-1&&window.updateCommands&&!window.external?1:0;if(self.vml){image.parentNode.replaceChild(self,image);}else{reso.height=self.ih;reso.width=self.iw;reso.style.height=reso.height+'px';reso.style.width=reso.width+'px';if(self.wk4){reso.id=self.id+'_buffer';reso.style.position='fixed';reso.style.left='-99999px';reso.style.top='0px';image.parentNode.appendChild(reso);}
reso.ctx=reso.getContext("2d");reso.ctx.drawImage(image,0,0,self.iw,self.ih);image.parentNode.replaceChild(self,image);self.reso=reso;}self.pc=Math.min(Math.max((typeof options['level']==='number'?options['level']:snapfit.defaultLevel),0),6);self.sv=Math.min(Math.max((typeof options['snap']==='number'?options['snap']:snapfit.defaultSnap),1),24);self.nak=(typeof options['nokeys']==='boolean'?options['nokeys']:snapfit.defaultNokeys);self.ply=(typeof options['polygon']==='boolean'?options['polygon']:snapfit.defaultPolygon);self.pos=(typeof options['simple']==='boolean'?options['simple']:snapfit.defaultSimple);self.mix=(typeof options['mixed']==='boolean'?options['mixed']:snapfit.defaultMixed);self.bw=Math.min(Math.max((typeof options['bwide']==='number'?options['bwide']:snapfit.defaultBorderwide),1.0),6.0);self.bo=Math.min(Math.max((typeof options['bopacity']==='number'?options['bopacity']:snapfit.defaultBorderopacity),0.0),1.0);self.ao=Math.min(Math.max((typeof options['aopacity']==='number'?options['aopacity']:snapfit.defaultAreaopacity),0.0),1.0);self.so=Math.min(Math.max((typeof options['sopacity']==='number'?options['sopacity']:snapfit.defaultShadowopacity),0.0),1.0);self.hxs=dec2hex(parseInt((1-self.so)*255));self.lsd=300;self.nhc=false;self.ab=(typeof options['aborder']==='boolean'?options['aborder']:snapfit.defaultAreaborder);self.ai=(typeof options['aimage']==='boolean'?options['aimage']:snapfit.defaultAreaimage);self.bcl=(typeof options['bcolor']==='string'?options['bcolor'].match(/^#[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]$/i)?options['bcolor']:snapfit.defaultBgrndcolor:snapfit.defaultBgrndcolor);self.fcl=(typeof options['fcolor']==='string'?options['fcolor'].match(/^#[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]$/i)?options['fcolor']:snapfit.defaultFalsecolor:snapfit.defaultFalsecolor);self.acl=(typeof options['acolor']==='string'?options['acolor'].match(/^#[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]$/i)?options['acolor']:snapfit.defaultAreacolor:snapfit.defaultAreacolor);self.mcl=(typeof options['mcolor']==='string'?options['mcolor'].match(/^#[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]$/i)?options['mcolor']:snapfit.defaultMatchcolor:snapfit.defaultMatchcolor);self.tmp=Math.min(self.iw,self.ih)/(self.ply?2:1);self.sz=[Math.min(self.tmp,160),Math.min(self.tmp,128),Math.min(self.tmp,104),Math.min(self.tmp,80),Math.min(self.tmp,64),Math.min(self.tmp,56),Math.min(self.tmp,48)];self.dbc=hex2rgb(self.bcl);self.dfc=hex2rgb(self.fcl);self.dac=hex2rgb(self.acl);self.dmc=hex2rgb(self.mcl);self.style.MozUserSelect="none";self.style.KhtmlUserSelect="none";self.style.WebkitUserSelect="none";self.unselectable="on";self.offsetX=snapfit._xoff(self);self.offsetY=snapfit._yoff(self);self.deltaX=0;self.deltaY=0;self.evtX=0;self.evtY=0;self.dragging=false;self.progress=false;self.cur=-1;snapfit.reset(self,self.pc,true);if(self.mix){snapfit.admix(self,self.pos,true);}
if(self.vml){self.oncontextmenu=function(){return false;};if(!self.nak){self.onmouseenter=this._catchEnter;self.onmouseleave=this._catchLeave;}}else{self.ctx=self.getContext("2d");self.ctx.shadowOffsetX=4;self.ctx.shadowOffsetY=4;self.ctx.shadowBlur=6;self.ctx.shadowColor="rgba(0,0,0,0)";self.onmousedown=this._isPressed;self.onmousemove=this._isDragged;self.onmouseup=this._isReleased;self.ondblclick=this._isDblclicked;self.onmouseout=this._isReleased;self.onclick=function(){return false;};self.oncontextmenu=function(){return false;};if(!self.nak){self.onmouseover=this._catchOver;self.addEventListener('mouseout',this._catchOut,false);}}snapfit._paint(self);return true;}return false;}return false;},remove:function(self){if(!self.progress&&(self.getContext||self.tagName.toUpperCase()=="VAR")){var obj=self.parentNode,img=document.createElement('img');if(self.wk4){obj.removeChild(document.getElementById(self.id+'_buffer'));}
img.id=self.id;img.alt=self.alt;img.title=self.title;img.src=self.img;img.className=self.className;img.style.cssText=self.style.cssText;img.style.height=self.height+'px';img.style.width=self.width+'px';obj.replaceChild(img,self);}},reset:function(self,pres,option){if(!self.progress&&(self.getContext||self.tagName.toUpperCase()=="VAR")){self.progress=true;self.style.cursor=self.vml?'wait':'progress';self.pc=Math.min(Math.max((typeof pres==='number'?pres:self.pc),0),6);var i,j,a,t,m,xo,yo,wp,wf,hp,hf,tw,th,lt,lc,lb,ct,cc,cb,rt,rc,rb,z=0,n=self.sz[self.pc],p={};t=self.iw/n;wp=Math.round(t);tw=self.iw/wp;wf=tw/self.iw;xo=wf*.25;t=self.ih/n;hp=Math.round(t);th=self.ih/hp;hf=th/self.ih;yo=hf*.25;m=[[0,0],[0,hf],[wf,hf],[wf,0]];self.obj=[];if(self.ply){p.lt=[[0,0],[0,hf],[xo,hf],[wf/2,hf+yo],[wf-xo,hf],[wf,hf],[wf,hf-yo],[wf+xo,hf/2],[wf,yo],[wf,0]];p.ltz=snapfit._shade(p.lt,self.lsd,self.nhc);p.ct=[[0,0],[0,yo],[xo,hf/2],[0,hf-yo],[0,hf],[xo,hf],[wf/2,hf+yo],[wf-xo,hf],[wf,hf],[wf,hf-yo],[wf+xo,hf/2],[wf,yo],[wf,0]];p.ctz=snapfit._shade(p.ct,self.lsd,self.nhc);p.rt=[[0,0],[0,yo],[xo,hf/2],[0,hf-yo],[0,hf],[xo,hf],[wf/2,hf+yo],[wf-xo,hf],[wf,hf],[wf,0]];p.rtz=snapfit._shade(p.rt,self.lsd,self.nhc);p.lc=[[0,0],[0,hf],[xo,hf],[wf/2,hf+yo],[wf-xo,hf],[wf,hf],[wf,hf-yo],[wf+xo,hf/2],[wf,yo],[wf,0],[wf-xo,0],[wf/2,yo],[xo,0]];p.lcz=snapfit._shade(p.lc,self.lsd,self.nhc);p.cc=[[0,0],[0,yo],[xo,hf/2],[0,hf-yo],[0,hf],[xo,hf],[wf/2,hf+yo],[wf-xo,hf],[wf,hf],[wf,hf-yo],[wf+xo,hf/2],[wf,yo],[wf,0],[wf-xo,0],[wf/2,yo],[xo,0]];p.ccz=snapfit._shade(p.cc,self.lsd,self.nhc);p.rc=[[0,0],[0,yo],[xo,hf/2],[0,hf-yo],[0,hf],[xo,hf],[wf/2,hf+yo],[wf-xo,hf],[wf,hf],[wf,0],[wf-xo,0],[wf/2,yo],[xo,0]];p.rcz=snapfit._shade(p.rc,self.lsd,self.nhc);p.lb=[[0,0],[0,hf],[wf,hf],[wf,hf-yo],[wf+xo,hf/2],[wf,yo],[wf,0],[wf-xo,0],[wf/2,yo],[xo,0]];p.lbz=snapfit._shade(p.lb,self.lsd,self.nhc);p.cb=[[0,0],[0,yo],[xo,hf/2],[0,hf-yo],[0,hf],[wf,hf],[wf,hf-yo],[wf+xo,hf/2],[wf,yo],[wf,0],[wf-xo,0],[wf/2,yo],[xo,0]];p.cbz=snapfit._shade(p.cb,self.lsd,self.nhc);p.rb=[[0,0],[0,yo],[xo,hf/2],[0,hf-yo],[0,hf],[wf,hf],[wf,0],[wf-xo,0],[wf/2,yo],[xo,0]];p.rbz=snapfit._shade(p.rb,self.lsd,self.nhc);for(i=0;i<hp;i++){if(i==0){for(j=0;j<wp;j++){self.obj[z]=new Object();self.obj[z].a=0;self.obj[z].f=0;self.obj[z].m=0;self.obj[z].x=(j*wf);self.obj[z].y=(i*hf);if(j==0){self.obj[z].s=0;self.obj[z].w=wf+xo;self.obj[z].h=hf+yo;self.obj[z].t=p.lt;self.obj[z].l=p.ltz;}else if(j==(wp-1)){self.obj[z].s=1;self.obj[z].w=wf;self.obj[z].h=hf+yo;self.obj[z].t=p.rt;self.obj[z].l=p.rtz;}else{self.obj[z].s=0;self.obj[z].w=wf+xo;self.obj[z].h=hf+yo;self.obj[z].t=p.ct;self.obj[z].l=p.ctz;}z++;}}
else if(i==(hp-1)){for(j=0;j<wp;j++){self.obj[z]=new Object();self.obj[z].a=0;self.obj[z].f=0;self.obj[z].m=0;self.obj[z].x=(j*wf);self.obj[z].y=(i*hf);if(j==0){self.obj[z].s=2;self.obj[z].w=wf+xo;self.obj[z].h=hf;self.obj[z].t=p.lb;self.obj[z].l=p.lbz;}else if(j==(wp-1)){self.obj[z].s=3;self.obj[z].w=wf;self.obj[z].h=hf;self.obj[z].t=p.rb;self.obj[z].l=p.rbz;}else{self.obj[z].s=2;self.obj[z].w=wf+xo;self.obj[z].h=hf;self.obj[z].t=p.cb;self.obj[z].l=p.cbz;}z++;}}
else{for(j=0;j<wp;j++){self.obj[z]=new Object();self.obj[z].a=0;self.obj[z].f=0;self.obj[z].m=0;self.obj[z].x=(j*wf);self.obj[z].y=(i*hf);if(j==0){self.obj[z].s=0;self.obj[z].w=wf+xo;self.obj[z].h=hf+yo;self.obj[z].t=p.lc;self.obj[z].l=p.lcz;}else if(j==(wp-1)){self.obj[z].s=1;self.obj[z].w=wf;self.obj[z].h=hf+yo;self.obj[z].t=p.rc;self.obj[z].l=p.rcz;}else{self.obj[z].s=0;self.obj[z].w=wf+xo;self.obj[z].h=hf+yo;self.obj[z].t=p.cc;self.obj[z].l=p.ccz;}z++;}}}}
else{for(i=0;i<hp;i++){for(j=0;j<wp;j++){self.obj[z]=new Object();self.obj[z].a=0;self.obj[z].f=0;self.obj[z].m=0;self.obj[z].x=(j*wf);self.obj[z].y=(i*hf);self.obj[z].w=wf;self.obj[z].h=hf;self.obj[z].t=m;z++;}}}
for(i=0;i<self.obj.length;i++){a=[],t=self.obj[i].t;for(j=0;j<t.length;j++){a[j]=[t[j][0]*self.iw,t[j][1]*self.ih];}self.obj[i].t=a;self.obj[i].w=self.obj[i].w*self.iw;self.obj[i].h=self.obj[i].h*self.ih;self.obj[i].x=self.xo+(self.obj[i].x*self.iw);self.obj[i].y=self.yo+(self.obj[i].y*self.ih);self.obj[i].ox=self.obj[i].x-self.xo;self.obj[i].oy=self.obj[i].y-self.yo;self.obj[i].ow=self.obj[i].w;self.obj[i].oh=self.obj[i].h;}
if(self.vml){var ele,head,foot,fill,back,parts='';head='<v:group oncontextmenu="return false" unselectable="on" style="zoom:1;display:'+self.dpl+';margin:0px;padding:0px;position:relative;width:'+self.width+'px;height:'+self.height+'px;" coordsize="'+self.width+','+self.height+'"><v:rect oncontextmenu="return false" unselectable="on" strokeweight="0" filled="f" stroked="f" strokeweight="0" style="zoom:1;margin:0;padding:0;display:block;position:absolute;top:0px;left:0px;width:'+self.width+'px;height:'+self.height+'px;"></v:rect>';foot='</v:group>';back='<v:rect oncontextmenu="return false" unselectable="on" filled="t" stroked="'+(!self.ai&&self.ab?'t':'f')+'" strokeweight="'+(!self.ai&&self.ab?1:0)+'" style="zoom:1;margin:0px;padding:0px;display:block;position:absolute;top:'+self.yo+'px;left:'+self.xo+'px;width:'+self.iw+'px;height:'+self.ih+'px; filter:Alpha(opacity='+(self.ai?0:self.ao*100)+')"><v:fill color="'+self.acl+'" /></v:rect>';fill='<v:rect oncontextmenu="return false" unselectable="on" filled="t" stroked="'+(self.ai&&self.ab?'t':'f')+'" strokeweight="'+(self.ai&&self.ab?1:0)+'" style="zoom:1;margin:0px;padding:0px;display:block;position:absolute;top:'+self.yo+'px;left:'+self.xo+'px;width:'+self.iw+'px;height:'+self.ih+'px; filter:Alpha(opacity='+(self.ai?self.ao*100:0)+')"><v:fill src="'+self.img+'" type="frame" aspect="atleast" /></v:rect>';var p,l,wl,hl,k=0,x=.5,y=.5,w=parseFloat(1/wp),h=parseFloat(1/hp);tw=wp;th=hp;if(self.ply){wl=(self.obj[self.obj.length-1].w/self.obj[0].w);hl=(self.obj[self.obj.length-1].h/self.obj[0].h);if(wp<=2){xo=0.5-((1-wl)/1.5);}else{xo=0.5-(0.5*(1-wl)/(wp*.5));}if(hp<=2){yo=0.5-((1-hl)/1.5);}else{yo=0.5-(0.5*(1-hl)/(hp*.5));}}
for(i=0;i<hp;i++){for(j=0;j<wp;j++){t=self.obj[k].t;if(self.ply){tw=parseFloat(self.iw/self.obj[k].w);th=parseFloat(self.ih/self.obj[k].h);if(self.obj[k].s==3){x=.5;y=.5;}else{x=self.obj[k].s==0||self.obj[k].s==2?xo:.5;y=self.obj[k].s==0||self.obj[k].s==1?yo:.5;}}p="m "+parseInt(t[0][0]*100)+","+parseInt(t[0][1]*100);for(l=1;l<t.length;l++){p+=" l "+parseInt(t[l][0]*100)+","+parseInt(t[l][1]*100);}p+=" x e";parts+='<v:shape id="'+self.id+'|obj_'+k+'" oncontextmenu="return false" unselectable="on" filled="t" stroked="t" strokeweight="1" strokecolor="'+self.bcl+'" coordorigin="0,0" coordsize="'+parseInt(self.obj[k].w*100)+','+parseInt(self.obj[k].h*100)+'" path="'+p+'" style="cursor:hand;zoom:1;margin:0px;padding:0px;display:block;position:absolute;top:'+self.obj[k].y+'px;left:'+self.obj[k].x+'px;width:'+self.obj[k].w+'px;height:'+self.obj[k].h+'px; filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=0);"><v:fill color="'+self.bcl+'" opacity="1" src="'+self.img+'" type="frame" aspect="atleast" size="'+tw+','+th+'" origin="'+((j+x-(wp*x))*w)+','+((i+y-(hp*y))*h)+'" position="0,0" /></v:shape>';k++;}}self.innerHTML=head+back+fill+parts+foot;for(i=0;i<self.obj.length;i++){ele=document.getElementById(self.id+'|obj_'+i);ele.ondblclick=snapfit._ieDblclicked;ele.onmousedown=snapfit._iePressed;}}if(window.opera){for(i=0;i<self.obj.length;i++){self.obj[i].ow=self.obj[i].ow-0.001;self.obj[i].oh=self.obj[i].oh-0.001;}}if(!option){snapfit._paint(self);}self.style.cursor='auto';self.progress=false;return true;}else{return false;}},admix:function(self,simple,option){simple=simple||false;if(!self.progress&&(self.getContext||self.tagName.toUpperCase()=="VAR")){function R(v){return Math.floor(Math.random()*v);}var ele,i,j,l,r,a=90;self.progress=true;if(self.vml){self.style.cursor='wait';for(i=0;i<self.obj.length;i++){ele=document.getElementById(self.id+'|obj_'+i);if(!simple){l=R(4);self.obj[i].a=l*90;self.obj[i].f=R(2);ele.style.filter="progid:DXImageTransform.Microsoft.BasicImage(rotation="+parseInt(self.obj[i].a/90)+", mirror="+self.obj[i].f+")";ele.firstChild.color=self.bcl;ele.firstChild.opacity=self.obj[i].f?self.bo:1;}
self.obj[i].x=R(self.width-self.obj[i].w);self.obj[i].y=R(self.height-self.obj[i].h);ele.style.left=self.obj[i].x+'px';ele.style.top=self.obj[i].y+'px';}}else{self.style.cursor='progress';for(i=0;i<self.obj.length;i++){self.obj[i].x=R(self.width-self.obj[i].w);self.obj[i].y=R(self.height-self.obj[i].h);l=R(4);if(!simple){for(j=0;j<l;j++){r=self.obj[i].a;self.obj[i]=snapfit._rotate(self.obj[i],self.width,self.height,a,self.ply,self.lsd,self.nhc);self.obj[i].a=r<(360-a)?self.obj[i].a+a:0;}
if(R(2)){self.obj[i].t=snapfit._flipY(self.obj[i].t,self.obj[i].x,self.obj[i].w);if(self.ply){self.obj[i].l=snapfit._shade(self.obj[i].t,self.lsd,self.nhc);}if(self.obj[i].a==90||self.obj[i].a==270){self.obj[i].m=self.obj[i].m?0:1;}else{self.obj[i].f=self.obj[i].f?0:1;}}
if(R(2)){self.obj[i].t=snapfit._flipX(self.obj[i].t,self.obj[i].y,self.obj[i].h);if(self.ply){self.obj[i].l=snapfit._shade(self.obj[i].t,self.lsd,self.nhc);}if(self.obj[i].a==90||self.obj[i].a==270){self.obj[i].f=self.obj[i].f?0:1;}else{self.obj[i].m=self.obj[i].m?0:1;}}}}if(!option){snapfit._paint(self);}}self.style.cursor='auto';self.progress=false;return true;}else{return false;}},solve:function(self,option){if(!self.progress&&(self.getContext||self.tagName.toUpperCase()=="VAR")){var i,j,l,p,r,n=1,odd=0,m=4,a=90;for(i=0;i<self.obj.length;i++){p=self.obj[i];if((p.f&&p.m&&p.a==180)||(!p.f&&!p.m&&p.a==0)){if(p.x!=(p.ox+self.xo)||p.x!=(p.ox+self.xo)||p.y!=(p.oy+self.yo)||p.y!=(p.oy+self.yo)){n=0;break;}}else{n=0;break;}}
if(!n){if(self.vml){for(i=0;i<self.obj.length;i++){odd=document.getElementById(self.id+'|obj_'+i);self.obj[i].f=0;self.obj[i].a=0;self.obj[i].w=self.obj[i].ow;self.obj[i].h=self.obj[i].oh;odd.firstChild.opacity=1;odd.style.filter="progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=0)";}if(!option){if(self.timer){window.clearInterval(self.timer);}self.progress=true;self.style.cursor='wait';var q=0,c=0,t=20,k=1/t,sx=[],sy=[],ex=[],ey=[];for(i=0;i<self.obj.length;i++){sx[i]=self.obj[i].x;sy[i]=self.obj[i].y;ex[i]=self.obj[i].ox+self.xo;ey[i]=self.obj[i].oy+self.yo;}
self.timer=window.setInterval(function(){q=((-Math.cos((k*c)*Math.PI)/2)+0.5)||0;for(i=0;i<self.obj.length;i++){odd=document.getElementById(self.id+'|obj_'+i);odd.style.left=Math.ceil(sx[i]+(q*(ex[i]-sx[i])))+'px';odd.style.top=Math.ceil(sy[i]+(q*(ey[i]-sy[i])))+'px';}c++;if(c>t){window.clearInterval(self.timer);for(i=0;i<self.obj.length;i++){self.obj[i].x=self.obj[i].ox+self.xo;self.obj[i].y=self.obj[i].oy+self.yo;odd=document.getElementById(self.id+'|obj_'+i);odd.style.left=self.obj[i].x+'px';odd.style.top=self.obj[i].y+'px';}self.style.cursor='auto';self.progress=false;}},30);}}else{for(i=0;i<self.obj.length;i++){odd=self.obj[i].a==90||self.obj[i].a==270?1:0;if((self.obj[i].m&&odd)||self.obj[i].f){self.obj[i].t=snapfit._flipY(self.obj[i].t,self.obj[i].x,self.obj[i].w);if(self.ply){self.obj[i].l=snapfit._shade(self.obj[i].t,self.lsd,self.nhc);}if(odd){self.obj[i].m=self.obj[i].m?0:1;}else{self.obj[i].f=self.obj[i].f?0:1;}}
if((self.obj[i].f&&odd)||self.obj[i].m){self.obj[i].t=snapfit._flipX(self.obj[i].t,self.obj[i].y,self.obj[i].h);if(self.ply){self.obj[i].l=snapfit._shade(self.obj[i].t,self.lsd,self.nhc);}if(odd){self.obj[i].f=self.obj[i].f?0:1;}else{self.obj[i].m=self.obj[i].m?0:1;}}
if((self.obj[i].m&&odd)||self.obj[i].f){self.obj[i].t=snapfit._flipY(self.obj[i].t,self.obj[i].x,self.obj[i].w);if(self.ply){self.obj[i].l=snapfit._shade(self.obj[i].t,self.lsd,self.nhc);}if(odd){self.obj[i].m=self.obj[i].m?0:1;}else{self.obj[i].f=self.obj[i].f?0:1;}}
if((self.obj[i].f&&odd)||self.obj[i].m){self.obj[i].t=snapfit._flipX(self.obj[i].t,self.obj[i].y,self.obj[i].h);if(self.ply){self.obj[i].l=snapfit._shade(self.obj[i].t,self.lsd,self.nhc);}if(odd){self.obj[i].f=self.obj[i].f?0:1;}else{self.obj[i].m=self.obj[i].m?0:1;}}
n=self.obj[i].a/90;l=n>0?m-n:0;for(j=0;j<l;j++){r=self.obj[i].a;self.obj[i]=snapfit._rotate(self.obj[i],self.width,self.height,a,self.ply,self.lsd,self.nhc);self.obj[i].a=r<(360-a)?self.obj[i].a+a:0;}
if(option){self.obj[i].x=self.obj[i].ox+self.xo;self.obj[i].y=self.obj[i].oy+self.yo;}}if(!option){if(self.timer){window.clearInterval(self.timer);}self.progress=true;self.style.cursor='progress';var q=0,c=0,t=20,k=1/t,sx=[],sy=[],ex=[],ey=[];for(i=0;i<self.obj.length;i++){sx[i]=self.obj[i].x;sy[i]=self.obj[i].y;ex[i]=self.obj[i].ox+self.xo;ey[i]=self.obj[i].oy+self.yo;}
self.timer=window.setInterval(function(){q=((-Math.cos((k*c)*Math.PI)/2)+0.5)||0;for(i=0;i<self.obj.length;i++){self.obj[i].x=Math.ceil(sx[i]+(q*(ex[i]-sx[i])));self.obj[i].y=Math.ceil(sy[i]+(q*(ey[i]-sy[i])));}c++;snapfit._paint(self);if(c>t){window.clearInterval(self.timer);for(i=0;i<self.obj.length;i++){self.obj[i].x=self.obj[i].ox+self.xo;self.obj[i].y=self.obj[i].oy+self.yo;}snapfit._paint(self);self.style.cursor='auto';self.progress=false;}},30);}}return true;}else{return false;}}else{return false;}},_paint:function(self){if(!self.vml&&self.obj){var p,c,k,i,j,xoff,yoff,angle,img=self.reso;self.ctx.clearRect(0,0,self.width,self.height);self.ctx.fillStyle="rgba("+self.dac+","+self.ao+")";if(self.ab){self.ctx.lineWidth=1;self.ctx.strokeStyle="rgba(0,0,0,"+self.ao+")";self.ctx.strokeRect(self.xo,self.yo,self.iw,self.ih);}
if(self.ai){self.ctx.globalAlpha=self.ao;self.ctx.drawImage(img,self.xo,self.yo,self.iw,self.ih);self.ctx.globalAlpha=1.0;}else{self.ctx.fillRect(self.xo,self.yo,self.iw,self.ih);}self.ctx.save();for(i=0;i<self.obj.length;i++){p=self.obj[i];self.ctx.save();if(i==self.cur){self.ctx.shadowColor="rgba(0,0,0,"+self.so+")";}self.ctx.fillStyle="rgba("+self.dac+",1)"||"rgba(255,255,255,1)";self.ctx.beginPath();self.ctx.moveTo(p.x+p.t[0][0],p.y+p.t[0][1]);for(j=1;j<p.t.length;j++){self.ctx.lineTo(p.x+p.t[j][0],p.y+p.t[j][1]);}
self.ctx.closePath();self.ctx.fill();if(i==self.cur){self.ctx.shadowColor="rgba(0,0,0,0)";}
if(self.wk4){self.ctx.beginPath();self.ctx.moveTo(p.x+p.t[0][0],p.y+p.t[0][1]);for(j=1;j<p.t.length;j++){self.ctx.lineTo(p.x+p.t[j][0],p.y+p.t[j][1]);}self.ctx.closePath();}self.ctx.clip();if(self.ge8){self.ctx.fillStyle="rgba(0,0,0,0)";self.ctx.fillRect(p.x,p.y,p.w,p.h);}
if(p.a!=0||p.f||p.m){self.ctx.save();xoff=p.x;yoff=p.y;angle=(p.a+(p.a>=0?0:360))*Math.PI/180;self.ctx.translate(xoff,yoff);self.ctx.rotate(angle);self.ctx.scale((!p.f?1:-1),(!p.m?1:-1));self.ctx.translate(-xoff,-yoff);if(p.a==90){self.ctx.drawImage(img,p.ox,p.oy,p.ow,p.oh,p.x-(p.f*p.ow),p.y-p.oh+(p.m*p.oh),p.ow,p.oh);}else if(p.a==180){self.ctx.drawImage(img,p.ox,p.oy,p.ow,p.oh,p.x-p.ow+(p.f*p.ow),p.y-p.oh+(p.m*p.oh),p.ow,p.oh);}else if(p.a==270){self.ctx.drawImage(img,p.ox,p.oy,p.ow,p.oh,p.x-p.ow+(p.f*p.ow),p.y-(p.m*p.oh),p.ow,p.oh);}else{self.ctx.drawImage(img,p.ox,p.oy,p.ow,p.oh,p.x-(p.f*p.ow),p.y-(p.m*p.oh),p.ow,p.oh);}self.ctx.restore();}else{self.ctx.drawImage(img,p.ox,p.oy,p.ow,p.oh,p.x,p.y,p.w,p.h);}self.ctx.lineWidth=self.bw*2;if(!self.progress&&i==self.cur){if((!p.f&&p.m)||(p.f&&!p.m)){self.ctx.fillStyle="rgba("+self.dbc+","+self.bo+")";self.ctx.fillRect(p.x,p.y,p.w,p.h);}
if((p.f&&p.m&&p.a==180)||(!p.f&&!p.m&&p.a==0)){if(p.x<=(p.ox+self.xo+self.sv)&&p.x>=(p.ox+self.xo-self.sv)&&p.y<=(p.oy+self.yo+self.sv)&&p.y>=(p.oy+self.yo-self.sv)){self.ctx.strokeStyle="rgba("+self.dmc+",1)";}else{self.ctx.strokeStyle="rgba("+self.dfc+",1)";}}else{self.ctx.strokeStyle="rgba("+self.dfc+",1)";}
if(self.ply){if(self.wk4||self.ge8){self.ctx.beginPath();self.ctx.moveTo(p.x+p.t[0][0],p.y+p.t[0][1]);for(j=1;j<p.t.length;j++){self.ctx.lineTo(p.x+p.t[j][0],p.y+p.t[j][1]);}self.ctx.closePath();}self.ctx.stroke();}else{self.ctx.strokeRect(p.x,p.y,p.w,p.h);}}else{if(self.ply){if((!p.f&&p.m)||(p.f&&!p.m)){self.ctx.fillStyle="rgba("+self.dbc+","+self.bo+")";self.ctx.fillRect(p.x,p.y,p.w,p.h);self.ctx.strokeStyle="rgba("+self.dbc+",1)";if(self.wk4||self.ge8){self.ctx.beginPath();self.ctx.moveTo(p.x+p.t[0][0],p.y+p.t[0][1]);for(j=1;j<p.t.length;j++){self.ctx.lineTo(p.x+p.t[j][0],p.y+p.t[j][1]);}self.ctx.closePath();}self.ctx.stroke();}
else{for(j=0;j<p.t.length;j++){c=p.l[j];k=j<p.t.length-1?j+1:0;self.ctx.strokeStyle="rgba("+c+","+c+","+c+","+self.bo+")";self.ctx.beginPath();self.ctx.moveTo(p.x+p.t[j][0],p.y+p.t[j][1]);self.ctx.lineTo(p.x+p.t[k][0],p.y+p.t[k][1]);self.ctx.stroke();}}}else{if((!p.f&&p.m)||(p.f&&!p.m)){self.ctx.fillStyle="rgba("+self.dbc+","+self.bo+")";self.ctx.fillRect(p.x,p.y,p.w,p.h);self.ctx.strokeStyle="rgba("+self.dbc+",1)";self.ctx.strokeRect(p.x,p.y,p.w,p.h);}
else{self.ctx.strokeStyle="rgba(0,0,0,"+self.bo+")";self.ctx.strokeRect(p.x-self.bw,p.y-self.bw,p.w+self.bw,p.h+self.bw);self.ctx.strokeStyle="rgba(255,255,255,"+self.bo+")";self.ctx.strokeRect(p.x,p.y,p.w+self.bw,p.h+self.bw);}}}self.ctx.restore();}self.ctx.restore();}return false;},_isPressed:function(e){if(this.progress){return false;}
function last(a,i){var t=a[i];a.splice(i,1);a.push(t);return a;};if(this.obj){this.evtX=e.pageX-this.offsetX;this.evtY=e.pageY-this.offsetY;this.cur=snapfit._isContained(this);if(this.cur>-1){var p=this.obj[this.cur];if(this.cur!=this.obj.length-1){this.obj=last(this.obj,this.cur);this.cur=this.obj.length-1;}
if(e.which==2){this.obj[this.cur].t=snapfit._flipY(p.t,p.x,p.w);if(this.ply){this.obj[this.cur].l=snapfit._shade(this.obj[this.cur].t,this.lsd,this.nhc);}if(p.a==90||p.a==270){this.obj[this.cur].m=p.m?0:1;}else{this.obj[this.cur].f=p.f?0:1;}snapfit._isCatched(this,this.cur);this.cur=-1;}
else if(e.which==3){this.obj[this.cur].t=snapfit._flipX(p.t,p.y,p.h);if(this.ply){this.obj[this.cur].l=snapfit._shade(this.obj[this.cur].t,this.lsd,this.nhc);}if(p.a==90||p.a==270){this.obj[this.cur].f=p.f?0:1;}else{this.obj[this.cur].m=p.m?0:1;}snapfit._isCatched(this,this.cur);this.cur=-1;}
else{this.dragging=true;this.style.cursor='move';this.deltaX=this.evtX-this.obj[this.cur].x;this.deltaY=this.evtY-this.obj[this.cur].y;}
snapfit._paint(this);}}return false;},_isDragged:function(e){if(!this.dragging||this.progress){return false;}
this.evtX=e.pageX-this.offsetX;this.evtY=e.pageY-this.offsetY;this.obj[this.cur].x=Math.min(this.width-this.obj[this.cur].w,Math.max(0,this.evtX-this.deltaX));this.obj[this.cur].y=Math.min(this.height-this.obj[this.cur].h,Math.max(0,this.evtY-this.deltaY));snapfit._paint(this);return false;},_isReleased:function(e){if(!this.dragging||this.progress){return false;}
this.dragging=false;snapfit._isCatched(this,this.cur);this.style.cursor='auto';this.cur=-1;snapfit._paint(this);return false;},_isDblclicked:function(e){var shift=e.shiftKey,alt=e.altKey;this.dragging=false;this.style.cursor='auto';this.cur=-1;if(this.obj){this.cur=snapfit._isContained(this);if(this.cur>-1){var r=90,p=this.obj[this.cur];if(!shift&&!alt){this.obj[this.cur]=snapfit._rotate(p,this.width,this.height,r,this.ply,this.lsd,this.nhc);this.obj[this.cur].a=p.a<(360-r)?p.a+r:0;snapfit._isCatched(this,this.cur);this.cur=-1;}
else if(shift&&!alt){this.obj[this.cur].t=snapfit._flipY(p.t,p.x,p.w);if(this.ply){this.obj[this.cur].l=snapfit._shade(this.obj[this.cur].t,this.lsd,this.nhc);}if(p.a==90||p.a==270){this.obj[this.cur].m=p.m?0:1;}else{this.obj[this.cur].f=p.f?0:1;}snapfit._isCatched(this,this.cur);this.cur=-1;}
else if(!shift&&alt){this.obj[this.cur].t=snapfit._flipX(p.t,p.y,p.h);if(this.ply){this.obj[this.cur].l=snapfit._shade(this.obj[this.cur].t,this.lsd,this.nhc);}if(p.a==90||p.a==270){this.obj[this.cur].f=p.f?0:1;}else{this.obj[this.cur].m=p.m?0:1;}snapfit._isCatched(this,this.cur);this.cur=-1;}
snapfit._paint(this);}}return false;},_iePressed:function(e){e=e?e:window.event;var ele,fil,f,r,d,tmp=e.srcElement,c=tmp.id.split("_"),i=parseInt(c[c.length-1]),obj=tmp.parentNode,par=tmp.parentNode.parentNode;if(!par.progress){if(e.button==2){par.dragging=false;par.obj[i].f=par.obj[i].f?0:1;tmp.firstChild.color=par.bcl;tmp.firstChild.opacity=par.obj[i].f?par.bo:1;tmp.style.filter="progid:DXImageTransform.Microsoft.BasicImage(rotation="+parseInt(par.obj[i].a/90)+", mirror="+par.obj[i].f+")";snapfit._isCatched(par,i);tmp.style.left=par.obj[i].x+'px';tmp.style.top=par.obj[i].y+'px';}else{r=parseInt(par.obj[i].a);if(r==0||r==180){d=r+135;}else{d=r-45;}d=par.obj[i].f?d+90:d;tmp.style.filter="progid:DXImageTransform.Microsoft.Shadow(Color="+par.hxs+", direction="+d+"), progid:DXImageTransform.Microsoft.BasicImage(rotation="+parseInt(par.obj[i].a/90)+", mirror="+par.obj[i].f+")";ele=document.createElement('v:shape');ele.id=tmp.id;ele.unselectable="on";ele.oncontextmenu=function(){return false;};ele.filled=tmp.filled;ele.stroked=tmp.stroked;ele.strokeweight=tmp.strokeweight;ele.strokecolor=tmp.strokecolor;ele.coordorigin=tmp.coordorigin;ele.coordsize=tmp.coordsize;ele.path=tmp.path;ele.style.cssText=tmp.style.cssText;fil=document.createElement('v:fill');fil=tmp.firstChild;obj.removeChild(tmp);obj.appendChild(ele);ele.appendChild(fil);ele.style.cursor="move";ele.firstChild.color=par.bcl;ele.mouseX=e.clientX;ele.mouseY=e.clientY;ele.ondblclick=snapfit._ieDblclicked;ele.onmousedown=snapfit._iePressed;ele.onmouseleave=snapfit._ieReleased;ele.strokecolor=snapfit._isCatched(par,i)?par.mcl:par.fcl;document.attachEvent("onmousemove",snapfit._ieDragged);document.attachEvent("onmouseup",snapfit._ieReleased);cvi_stpiece=ele.id;par.dragging=true;}}return false;},_ieDragged:function(e){e=e?e:window.event;var l,t,ele=e.srcElement,c=ele.id.split("_"),i=parseInt(c[c.length-1]),par=ele.parentNode.parentNode;if(!par.progress&&par.dragging){if(cvi_stpiece==ele.id){l=Math.max(0,Math.min(par.width-parseInt(par.obj[i].w),parseInt(ele.style.left)+(e.clientX-ele.mouseX)));t=Math.max(0,Math.min(par.height-parseInt(par.obj[i].h),parseInt(ele.style.top)+(e.clientY-ele.mouseY)));par.obj[i].x=l;par.obj[i].y=t;ele.firstChild.color=par.bcl;ele.style.left=l+'px';ele.style.top=t+'px';ele.mouseX=e.clientX;ele.mouseY=e.clientY;ele.strokecolor=snapfit._isCatched(par,i)?par.mcl:par.fcl;}else{snapfit._ieReleased(e);}}return false;},_ieReleased:function(e){e=e?e:window.event;var f,ele=document.getElementById(cvi_stpiece),c=ele.id.split("_"),i=parseInt(c[c.length-1]),par=ele.parentNode.parentNode;if(ele&&!par.progress&&par.dragging){cvi_stpiece=null;ele.style.filter="progid:DXImageTransform.Microsoft.BasicImage(rotation="+parseInt(par.obj[i].a/90)+", mirror="+par.obj[i].f+")";snapfit._isCatched(par,i);ele.style.cursor="hand";ele.onmouseleave=null;ele.strokecolor=par.bcl;ele.style.left=par.obj[i].x+'px';ele.style.top=par.obj[i].y+'px';document.detachEvent("onmousemove",snapfit._ieDragged);document.detachEvent("onmouseup",snapfit._ieReleased);par.dragging=false;}return false;},_ieDblclicked:function(e){e=e?e:window.event;var f,ele=e.srcElement,c=ele.id.split("_"),i=parseInt(c[c.length-1]),par=ele.parentNode.parentNode,shift=e.shiftKey,alt=e.altKey,r=90;if(!par.progress){par.dragging=false;ele.style.cursor='auto';if(!shift&&!alt){par.obj[i].a=par.obj[i].a<(360-r)?par.obj[i].a+r:0;c=par.obj[i].w;par.obj[i].w=par.obj[i].h;par.obj[i].h=c;}
else{par.obj[i].f=par.obj[i].f?0:1;ele.firstChild.color=par.bcl;ele.firstChild.opacity=par.obj[i].f?par.bo:1;}
ele.style.filter="progid:DXImageTransform.Microsoft.BasicImage(rotation="+parseInt(par.obj[i].a/90)+", mirror="+par.obj[i].f+")";snapfit._isCatched(par,i);ele.style.left=par.obj[i].x+'px';ele.style.top=par.obj[i].y+'px';}return false;},_isKeydown:function(e){if(cvi_stactive!=null){var k,del=46,esc=27,ent=13,bsp=8,self=document.getElementById(cvi_stactive);if(self.dragging||self.progress){return false;}k=(e.keyCode?e.keyCode:e.which);switch(k){case esc:snapfit.reset(self);break;case ent:snapfit.solve(self);break;case bsp:snapfit.admix(self,true);break;case del:snapfit.admix(self,false);break;}}return false;},_isKeypressed:function(e){return false;},_isKeyup:function(e){return false;},_catchOver:function(e){cvi_stactive=this.id;this.focus();document.addEventListener('keyup',snapfit._isKeyup,false);document.addEventListener('keypress',snapfit._isKeypressed,false);document.addEventListener('keydown',snapfit._isKeydown,false);return false;},_catchOut:function(e){cvi_stactive=null;document.removeEventListener('keyup',snapfit._isKeyup,false);document.removeEventListener('keypress',snapfit._isKeypressed,false);document.removeEventListener('keydown',snapfit._isKeydown,false);return false;},_catchEnter:function(e){cvi_stactive=this.id;this.focus();document.attachEvent("onkeyup",snapfit._isKeyup);document.attachEvent("onkeypress",snapfit._isKeypressed);document.attachEvent("onkeydown",snapfit._isKeydown);return false;},_catchLeave:function(e){cvi_stactive=null;document.detachEvent("onkeyup",snapfit._isKeyup);document.detachEvent("onkeypress",snapfit._isKeypressed);document.detachEvent("onkeydown",snapfit._isKeydown);return false;},_isContained:function(self){var i,j,k,c,p,l,t,x=self.evtX,y=self.evtY;for(i=self.obj.length-1;i>-1;i--){j=0;k=0;c=0;p=self.obj[i].t;l=self.obj[i].x;t=self.obj[i].y;for(k in p){j++;if(j==p.length){j=0;}
if((((t+p[k][1])<y)&&((t+p[j][1])>=y))||(((t+p[j][1])<y)&&((t+p[k][1])>=y))){if((l+p[k][0])+(y-(t+p[k][1]))/((t+p[j][1])-(t+p[k][1]))*((l+p[j][0])-(l+p[k][0]))<x){c=!c;}}}if(c){return i;}}return-1;},_isCatched:function(self,cur){var p=self.obj[cur];if((p.f&&p.m&&p.a==180)||(!p.f&&!p.m&&p.a==0)){if(p.x<=(p.ox+self.xo+self.sv)&&p.x>=(p.ox+self.xo-self.sv)&&p.y<=(p.oy+self.yo+self.sv)&&p.y>=(p.oy+self.yo-self.sv)){self.obj[cur].x=p.ox+self.xo;self.obj[cur].y=p.oy+self.yo;return true;}}return false;},_rotate:function(p,w,h,r,z,d,k){function sdx(v,z){return v[0]-z[0];};function sdy(v,z){return v[1]-z[1];};var j,x,y,px,py,mx=0,my=0,mw=1,mh=1,a=[],b=[],xo=p.x+(.5*p.w),yo=p.y+(.5*p.h),g=r*(Math.PI/180),cs=Math.cos(g),sn=Math.sin(g);for(j=0;j<p.t.length;j++){px=p.x+p.t[j][0];py=p.y+p.t[j][1];x=(px-xo)*cs-(py-yo)*sn+xo;y=(py-yo)*cs+(px-xo)*sn+yo;a[j]=[x,y];}
b=a.slice();b.sort(sdx);mx=b[0][0];mw=b[b.length-1][0];b.sort(sdy);my=b[0][1];mh=b[b.length-1][1];p.w=mw-mx;p.h=mh-my;p.x=mx;p.y=my;for(j=0;j<a.length;j++){a[j][0]=a[j][0]-p.x;a[j][1]=a[j][1]-p.y;}
p.x=Math.max(Math.min(w-p.w,p.x),0);p.y=Math.max(Math.min(h-p.h,p.y),0);p.t=a;if(z){p.l=snapfit._shade(a,d,k);}return p;},_flipY:function(t,tx,tw){var j,x,px,xo=tx+(.5*tw),a=[];for(j=0;j<t.length;j++){px=tx+t[j][0];if(px<xo){x=xo+(xo-px);a[j]=[Math.max(x-tx,0),t[j][1]];}else if(px>xo){x=xo-(px-xo);a[j]=[Math.max(x-tx,0),t[j][1]];}else{a[j]=[t[j][0],t[j][1]];}}return a;},_flipX:function(t,ty,th){var j,y,py,yo=ty+(.5*th),a=[];for(j=0;j<t.length;j++){py=ty+t[j][1];if(py<yo){y=yo+(yo-py);a[j]=[t[j][0],Math.max(y-ty,0)];}else if(py>yo){y=yo-(py-yo);a[j]=[t[j][0],Math.max(y-ty,0)];}else{a[j]=[t[j][0],t[j][1]];}}return a;},_shade:function(t,d,k){k=k||0;var i,ag,ad,at,av,dx,sx,ex,dy,sy,ey,ls=(d-180)*(Math.PI/180),z=[];function fabs(n){if(n>=0){return n;}else{return 0-n;}};function theta(x,y){var a=Math.atan2(y,x);if(a<0.0){a=2*Math.PI+a;}return a;};for(i=0;i<t.length;i++){sx=t[i][0];sy=t[i][1];if(i<t.length-1){ex=t[i+1][0];ey=t[i+1][1];}else{ex=t[0][0];ey=t[0][1];}
dy=(ey-sy);dx=(sx-ex);ag=2*Math.PI-theta(dx,dy);ad=fabs(ls-ag);at=0.5*(Math.cos(ad)+1.0);av=parseInt(at*0+(1.0-at)*255);z[i]=!k?av>127?255:0:av;}return z;},_xoff:function(n){var r=n.offsetLeft;for(var p=n;p=p.offsetParent;p!=null){r+=p.offsetLeft;}return r;},_yoff:function(n){var r=n.offsetTop;for(var p=n;p=p.offsetParent;p!=null){r+=p.offsetTop;}return r;},_swap:function(a,i){t=a[i];a[i]=a[a.length-1];a[a.length-1]=t;return a;}}
var swfobject=function(){var UNDEF="undefined",OBJECT="object",SHOCKWAVE_FLASH="Shockwave Flash",SHOCKWAVE_FLASH_AX="ShockwaveFlash.ShockwaveFlash",FLASH_MIME_TYPE="application/x-shockwave-flash",EXPRESS_INSTALL_ID="SWFObjectExprInst",win=window,doc=document,nav=navigator,domLoadFnArr=[],regObjArr=[],timer=null,storedAltContent=null,storedAltContentId=null,isDomLoaded=false,isExpressInstallActive=false;var ua=function(){var w3cdom=typeof doc.getElementById!=UNDEF&&typeof doc.getElementsByTagName!=UNDEF&&typeof doc.createElement!=UNDEF&&typeof doc.appendChild!=UNDEF&&typeof doc.replaceChild!=UNDEF&&typeof doc.removeChild!=UNDEF&&typeof doc.cloneNode!=UNDEF,playerVersion=[0,0,0],d=null;if(typeof nav.plugins!=UNDEF&&typeof nav.plugins[SHOCKWAVE_FLASH]==OBJECT){d=nav.plugins[SHOCKWAVE_FLASH].description;if(d){d=d.replace(/^.*\s+(\S+\s+\S+$)/,"$1");playerVersion[0]=parseInt(d.replace(/^(.*)\..*$/,"$1"),10);playerVersion[1]=parseInt(d.replace(/^.*\.(.*)\s.*$/,"$1"),10);playerVersion[2]=/r/.test(d)?parseInt(d.replace(/^.*r(.*)$/,"$1"),10):0;}}
else if(typeof win.ActiveXObject!=UNDEF){var a=null,fp6Crash=false;try{a=new ActiveXObject(SHOCKWAVE_FLASH_AX+".7");}
catch(e){try{a=new ActiveXObject(SHOCKWAVE_FLASH_AX+".6");playerVersion=[6,0,21];a.AllowScriptAccess="always";}
catch(e){if(playerVersion[0]==6){fp6Crash=true;}}
if(!fp6Crash){try{a=new ActiveXObject(SHOCKWAVE_FLASH_AX);}
catch(e){}}}
if(!fp6Crash&&a){try{d=a.GetVariable("$version");if(d){d=d.split(" ")[1].split(",");playerVersion=[parseInt(d[0],10),parseInt(d[1],10),parseInt(d[2],10)];}}
catch(e){}}}
var u=nav.userAgent.toLowerCase(),p=nav.platform.toLowerCase(),webkit=/webkit/.test(u)?parseFloat(u.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,ie=false,windows=p?/win/.test(p):/win/.test(u),mac=p?/mac/.test(p):/mac/.test(u);return{w3cdom:w3cdom,pv:playerVersion,webkit:webkit,ie:ie,win:windows,mac:mac};}();var onDomLoad=function(){if(!ua.w3cdom){return;}
addDomLoadEvent(main);if(ua.ie&&ua.win){try{doc.write("<scr"+"ipt id=__ie_ondomload defer=true src=//:></scr"+"ipt>");var s=getElementById("__ie_ondomload");if(s){s.onreadystatechange=function(){if(this.readyState=="complete"){this.parentNode.removeChild(this);callDomLoadFunctions();}};}}
catch(e){}}
if(ua.webkit&&typeof doc.readyState!=UNDEF){timer=setInterval(function(){if(/loaded|complete/.test(doc.readyState)){callDomLoadFunctions();}},10);}
if(typeof doc.addEventListener!=UNDEF){doc.addEventListener("DOMContentLoaded",callDomLoadFunctions,null);}
addLoadEvent(callDomLoadFunctions);}();function callDomLoadFunctions(){if(isDomLoaded){return;}
if(ua.ie&&ua.win){var s=createElement("span");try{var t=doc.getElementsByTagName("body")[0].appendChild(s);t.parentNode.removeChild(t);}
catch(e){return;}}
isDomLoaded=true;if(timer){clearInterval(timer);timer=null;}
var dl=domLoadFnArr.length;for(var i=0;i<dl;i++){domLoadFnArr[i]();}}
function addDomLoadEvent(fn){if(isDomLoaded){fn();}
else{domLoadFnArr[domLoadFnArr.length]=fn;}}
function addLoadEvent(fn){if(typeof win.addEventListener!=UNDEF){win.addEventListener("load",fn,false);}
else if(typeof doc.addEventListener!=UNDEF){doc.addEventListener("load",fn,false);}
else if(typeof win.attachEvent!=UNDEF){win.attachEvent("onload",fn);}
else if(typeof win.onload=="function"){var fnOld=win.onload;win.onload=function(){fnOld();fn();};}
else{win.onload=fn;}}
function main(){var rl=regObjArr.length;for(var i=0;i<rl;i++){var id=regObjArr[i].id;if(ua.pv[0]>0){var obj=getElementById(id);if(obj){regObjArr[i].width=obj.getAttribute("width")?obj.getAttribute("width"):"0";regObjArr[i].height=obj.getAttribute("height")?obj.getAttribute("height"):"0";if(hasPlayerVersion(regObjArr[i].swfVersion)){if(ua.webkit&&ua.webkit<312){fixParams(obj);}
setVisibility(id,true);}
else if(regObjArr[i].expressInstall&&!isExpressInstallActive&&hasPlayerVersion("6.0.65")&&(ua.win||ua.mac)){showExpressInstall(regObjArr[i]);}
else{displayAltContent(obj);}}}
else{setVisibility(id,true);}}}
function fixParams(obj){var nestedObj=obj.getElementsByTagName(OBJECT)[0];if(nestedObj){var e=createElement("embed"),a=nestedObj.attributes;if(a){var al=a.length;for(var i=0;i<al;i++){if(a[i].nodeName.toLowerCase()=="data"){e.setAttribute("src",a[i].nodeValue);}
else{e.setAttribute(a[i].nodeName,a[i].nodeValue);}}}
var c=nestedObj.childNodes;if(c){var cl=c.length;for(var j=0;j<cl;j++){if(c[j].nodeType==1&&c[j].nodeName.toLowerCase()=="param"){e.setAttribute(c[j].getAttribute("name"),c[j].getAttribute("value"));}}}
obj.parentNode.replaceChild(e,obj);}}
function fixObjectLeaks(id){if(ua.ie&&ua.win&&hasPlayerVersion("8.0.0")){win.attachEvent("onunload",function(){var obj=getElementById(id);if(obj){for(var i in obj){if(typeof obj[i]=="function"){obj[i]=function(){};}}
obj.parentNode.removeChild(obj);}});}}
function showExpressInstall(regObj){isExpressInstallActive=true;var obj=getElementById(regObj.id);if(obj){if(regObj.altContentId){var ac=getElementById(regObj.altContentId);if(ac){storedAltContent=ac;storedAltContentId=regObj.altContentId;}}
else{storedAltContent=abstractAltContent(obj);}
if(!(/%$/.test(regObj.width))&&parseInt(regObj.width,10)<310){regObj.width="310";}
if(!(/%$/.test(regObj.height))&&parseInt(regObj.height,10)<137){regObj.height="137";}
doc.title=doc.title.slice(0,47)+" - Flash Player Installation";var pt=ua.ie&&ua.win?"ActiveX":"PlugIn",dt=doc.title,fv="MMredirectURL="+win.location+"&MMplayerType="+pt+"&MMdoctitle="+dt,replaceId=regObj.id;if(ua.ie&&ua.win&&obj.readyState!=4){var newObj=createElement("div");replaceId+="SWFObjectNew";newObj.setAttribute("id",replaceId);obj.parentNode.insertBefore(newObj,obj);obj.style.display="none";win.attachEvent("onload",function(){obj.parentNode.removeChild(obj);});}
createSWF({data:regObj.expressInstall,id:EXPRESS_INSTALL_ID,width:regObj.width,height:regObj.height},{flashvars:fv},replaceId);}}
function displayAltContent(obj){if(ua.ie&&ua.win&&obj.readyState!=4){var el=createElement("div");obj.parentNode.insertBefore(el,obj);el.parentNode.replaceChild(abstractAltContent(obj),el);obj.style.display="none";win.attachEvent("onload",function(){obj.parentNode.removeChild(obj);});}
else{obj.parentNode.replaceChild(abstractAltContent(obj),obj);}}
function abstractAltContent(obj){var ac=createElement("div");if(ua.win&&ua.ie){ac.innerHTML=obj.innerHTML;}
else{var nestedObj=obj.getElementsByTagName(OBJECT)[0];if(nestedObj){var c=nestedObj.childNodes;if(c){var cl=c.length;for(var i=0;i<cl;i++){if(!(c[i].nodeType==1&&c[i].nodeName.toLowerCase()=="param")&&!(c[i].nodeType==8)){ac.appendChild(c[i].cloneNode(true));}}}}}
return ac;}
function createSWF(attObj,parObj,id){var r,el=getElementById(id);if(typeof attObj.id==UNDEF){attObj.id=id;}
if(ua.ie&&ua.win){var att="";for(var i in attObj){if(attObj[i]!=Object.prototype[i]){if(i=="data"){parObj.movie=attObj[i];}
else if(i.toLowerCase()=="styleclass"){att+=' class="'+attObj[i]+'"';}
else if(i!="classid"){att+=' '+i+'="'+attObj[i]+'"';}}}
var par="";for(var j in parObj){if(parObj[j]!=Object.prototype[j]){par+='<param name="'+j+'" value="'+parObj[j]+'" />';}}
el.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+att+'>'+par+'</object>';fixObjectLeaks(attObj.id);r=getElementById(attObj.id);}
else if(ua.webkit&&ua.webkit<312){var e=createElement("embed");e.setAttribute("type",FLASH_MIME_TYPE);for(var k in attObj){if(attObj[k]!=Object.prototype[k]){if(k=="data"){e.setAttribute("src",attObj[k]);}
else if(k.toLowerCase()=="styleclass"){e.setAttribute("class",attObj[k]);}
else if(k!="classid"){e.setAttribute(k,attObj[k]);}}}
for(var l in parObj){if(parObj[l]!=Object.prototype[l]){if(l!="movie"){e.setAttribute(l,parObj[l]);}}}
el.parentNode.replaceChild(e,el);r=e;}
else{var o=createElement(OBJECT);o.setAttribute("type",FLASH_MIME_TYPE);for(var m in attObj){if(attObj[m]!=Object.prototype[m]){if(m.toLowerCase()=="styleclass"){o.setAttribute("class",attObj[m]);}
else if(m!="classid"){o.setAttribute(m,attObj[m]);}}}
for(var n in parObj){if(parObj[n]!=Object.prototype[n]&&n!="movie"){createObjParam(o,n,parObj[n]);}}
el.parentNode.replaceChild(o,el);r=o;}
return r;}
function createObjParam(el,pName,pValue){var p=createElement("param");p.setAttribute("name",pName);p.setAttribute("value",pValue);el.appendChild(p);}
function getElementById(id){return doc.getElementById(id);}
function createElement(el){return doc.createElement(el);}
function hasPlayerVersion(rv){var pv=ua.pv,v=rv.split(".");v[0]=parseInt(v[0],10);v[1]=parseInt(v[1],10);v[2]=parseInt(v[2],10);return(pv[0]>v[0]||(pv[0]==v[0]&&pv[1]>v[1])||(pv[0]==v[0]&&pv[1]==v[1]&&pv[2]>=v[2]))?true:false;}
function createCSS(sel,decl){if(ua.ie&&ua.mac){return;}
var h=doc.getElementsByTagName("head")[0],s=createElement("style");s.setAttribute("type","text/css");s.setAttribute("media","screen");if(!(ua.ie&&ua.win)&&typeof doc.createTextNode!=UNDEF){s.appendChild(doc.createTextNode(sel+" {"+decl+"}"));}
h.appendChild(s);if(ua.ie&&ua.win&&typeof doc.styleSheets!=UNDEF&&doc.styleSheets.length>0){var ls=doc.styleSheets[doc.styleSheets.length-1];if(typeof ls.addRule==OBJECT){ls.addRule(sel,decl);}}}
function setVisibility(id,isVisible){var v=isVisible?"visible":"hidden";if(isDomLoaded){getElementById(id).style.visibility=v;}
else{createCSS("#"+id,"visibility:"+v);}}
function getTargetVersion(obj){if(!obj)
return 0;var c=obj.childNodes;var cl=c.length;for(var i=0;i<cl;i++){if(c[i].nodeType==1&&c[i].nodeName.toLowerCase()=="object"){c=c[i].childNodes;cl=c.length;i=0;}
if(c[i].nodeType==1&&c[i].nodeName.toLowerCase()=="param"&&c[i].getAttribute("name")=="swfversion"){return c[i].getAttribute("value");}}
return 0;}
function getExpressInstall(obj){if(!obj)
return"";var c=obj.childNodes;var cl=c.length;for(var i=0;i<cl;i++){if(c[i].nodeType==1&&c[i].nodeName.toLowerCase()=="object"){c=c[i].childNodes;cl=c.length;i=0;}
if(c[i].nodeType==1&&c[i].nodeName.toLowerCase()=="param"&&c[i].getAttribute("name")=="expressinstall"){return c[i].getAttribute("value");}}
return"";}
return{registerObject:function(objectIdStr,swfVersionStr,xiSwfUrlStr){if(!ua.w3cdom||!objectIdStr){return;}
var obj=document.getElementById(objectIdStr);var xi=getExpressInstall(obj);var regObj={};regObj.id=objectIdStr;regObj.swfVersion=swfVersionStr?swfVersionStr:getTargetVersion(obj);regObj.expressInstall=xiSwfUrlStr?xiSwfUrlStr:((xi!="")?xi:false);regObjArr[regObjArr.length]=regObj;setVisibility(objectIdStr,false);},getObjectById:function(objectIdStr){var r=null;if(ua.w3cdom&&isDomLoaded){var o=getElementById(objectIdStr);if(o){var n=o.getElementsByTagName(OBJECT)[0];if(!n||(n&&typeof o.SetVariable!=UNDEF)){r=o;}
else if(typeof n.SetVariable!=UNDEF){r=n;}}}
return r;},embedSWF:function(swfUrlStr,replaceElemIdStr,widthStr,heightStr,swfVersionStr,xiSwfUrlStr,flashvarsObj,parObj,attObj){if(!ua.w3cdom||!swfUrlStr||!replaceElemIdStr||!widthStr||!heightStr||!swfVersionStr){return;}
widthStr+="";heightStr+="";if(hasPlayerVersion(swfVersionStr)){setVisibility(replaceElemIdStr,false);var att=(typeof attObj==OBJECT)?attObj:{};att.data=swfUrlStr;att.width=widthStr;att.height=heightStr;var par=(typeof parObj==OBJECT)?parObj:{};if(typeof flashvarsObj==OBJECT){for(var i in flashvarsObj){if(flashvarsObj[i]!=Object.prototype[i]){if(typeof par.flashvars!=UNDEF){par.flashvars+="&"+i+"="+flashvarsObj[i];}
else{par.flashvars=i+"="+flashvarsObj[i];}}}}
addDomLoadEvent(function(){createSWF(att,par,replaceElemIdStr);if(att.id==replaceElemIdStr){setVisibility(replaceElemIdStr,true);}});}
else if(xiSwfUrlStr&&!isExpressInstallActive&&hasPlayerVersion("6.0.65")&&(ua.win||ua.mac)){setVisibility(replaceElemIdStr,false);addDomLoadEvent(function(){var regObj={};regObj.id=regObj.altContentId=replaceElemIdStr;regObj.width=widthStr;regObj.height=heightStr;regObj.expressInstall=xiSwfUrlStr;showExpressInstall(regObj);});}},getFlashPlayerVersion:function(){return{major:ua.pv[0],minor:ua.pv[1],release:ua.pv[2]};},hasFlashPlayerVersion:hasPlayerVersion,createSWF:function(attObj,parObj,replaceElemIdStr){if(ua.w3cdom&&isDomLoaded){return createSWF(attObj,parObj,replaceElemIdStr);}
else{return undefined;}},createCSS:function(sel,decl){if(ua.w3cdom){createCSS(sel,decl);}},addDomLoadEvent:addDomLoadEvent,addLoadEvent:addLoadEvent,getQueryParamValue:function(param){var q=doc.location.search||doc.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"";},expressInstallCallback:function(){if(isExpressInstallActive&&storedAltContent){var obj=getElementById(EXPRESS_INSTALL_ID);if(obj){obj.parentNode.replaceChild(storedAltContent,obj);if(storedAltContentId){setVisibility(storedAltContentId,true);if(ua.ie&&ua.win){storedAltContent.style.display="block";}}
storedAltContent=null;storedAltContentId=null;isExpressInstallActive=false;}}}};}();function getScrollOffset(){var scrOfX=0,scrOfY=0;if(typeof(window.pageYOffset)=='number'){scrOfY=window.pageYOffset;scrOfX=window.pageXOffset;}else if(document.body&&(document.body.scrollLeft||document.body.scrollTop)){scrOfY=document.body.scrollTop;scrOfX=document.body.scrollLeft;}else if(document.documentElement&&(document.documentElement.scrollLeft||document.documentElement.scrollTop)){scrOfY=document.documentElement.scrollTop;scrOfX=document.documentElement.scrollLeft;}
return{x:scrOfX,y:scrOfY,left:scrOfX,top:scrOfY};}
function getWindowSize(){var myWidth=0,myHeight=0;if(typeof(window.innerWidth)=='number'){myWidth=window.innerWidth;myHeight=window.innerHeight;}else if(document.documentElement&&(document.documentElement.clientWidth||document.documentElement.clientHeight)){myWidth=document.documentElement.clientWidth;myHeight=document.documentElement.clientHeight;}else if(document.body&&(document.body.clientWidth||document.body.clientHeight)){myWidth=document.body.clientWidth;myHeight=document.body.clientHeight;}
return{width:myWidth,height:myHeight};}
function getElementSize(myId){var el=document.getElementById(myId);var myWidth=0,myHeight=0;if(document.getElementById(myId).offsetHeight){myWidth=document.getElementById(myId).offsetWidth;myHeight=document.getElementById(myId).offsetHeight;}
else if(document.all.myId.offsetHeight){myWidth=document.all.myId.offsetWidth;myHeight=ddocument.all.myId.offsetHeight;}
return{width:myWidth,height:myHeight};}
function findPos(obj){var curleft=curtop=0;if(obj.offsetParent){do{curleft+=obj.offsetLeft;curtop+=obj.offsetTop;}while(obj=obj.offsetParent);}
return{x:curleft,y:curtop};}
function carousel(params){if(!(params.width>0&&isFinite(params.width)))params.width=100;if(!(params.height>0&&isFinite(params.height)))params.height=100;if(!(params.sides>2&&isFinite(params.sides)))params.sides=4;if(!(params.steps>0&&params.steps<100&&isFinite(params.steps)))params.steps=20;if(!(params.speed>0&&isFinite(params.speed)))params.speed=8;if(!(params.image_border_width>=0&&isFinite(params.image_border_width)))params.image_border_width=0;if(isFinite(params.id)||!params.id)params.id='bad_id_given_'+Math.random();document.write("<div style='position:relative;overflow:hidden;' id='"+params.id.replace(/[^a-zA-Z0-9]+/g,'_')+"'></div>");var cdiv=document.getElementById(params.id.replace(/[^a-zA-Z0-9]+/g,'_'))
cdiv.style.width=params.width+'px';cdiv.style.height=params.height+'px';cdiv.style.border=params.border;cdiv.style.position='relative';cdiv.style.overflow='hidden';cdiv.title=params.id;var counter=0,spinning=true,interval=Math.floor(60000/params.sides/params.steps/params.speed)-5;interval=isNaN(interval)?200:interval;var img_position=[],images=[],img_dimension=[];var img_index=params.images.length+1,img_index_cap=2*params.images.length;var faces=Math.ceil(params.sides/2),dimension,direction,targ,attr,faraway;function init(){if(params.direction=="left"||params.direction=="right"){direction=params.direction;dimension="width";}
else if(params.direction=="top"||params.direction=="bottom"){direction=params.direction;dimension="height";}
else{direction="left";dimension="width";}
faraway=(direction=="left"||direction=="top")?'-20000px':'20000px';cdiv.style[dimension]=params[dimension]/(params.size_mode=='image'?Math.sin(Math.PI/params.sides):1)+'px';var img=new Image();img.style.position='absolute';img.style[direction]=faraway;img.style.width=params.width-2*params.image_border_width+'px';img.style.height=params.height-2*params.image_border_width+'px';img.style.border=(params.image_border_width||0)+'px solid '+params.image_border_color;for(var i=0;i<params.images.length;i++){images[i]=img.cloneNode(true);images[i].src=params.images[i];if(params.links&&params.links[i]&&params.links[i]!=''){targ=params.lnk_targets&&params.lnk_targets[i]||params.lnk_base||'new';if(targ=="_blank"){attr=(params.lnk_attr&&params.lnk_attr[i])?",'"+params.lnk_attr[i]+"'":"";images[i].onclick=new Function("window.open('"+params.links[i]+"','"+targ+"'"+attr+")");}
else if(targ.substr(0,1)=="_"){images[i].onclick=new Function(targ.substr(1)+".location='"+params.links[i]+"'");}
else if(targ.substr(0,5)=="ajax"){attr=(params.lnk_attr&&params.lnk_attr[i])?params.lnk_attr[i]:"";images[i].onclick=new Function("productDetail("+attr+")");}
else if(targ.substr(0,8)=="showhide"){attr=(params.lnk_attr&&params.lnk_attr[i])?params.lnk_attr[i]:"";images[i].onclick=new Function("showAndHide('sushi_category_tr_1,sushi_category_tr_2,sushi_category_tr_3,sushi_category_tr_4,sushi_category_tr_5,sushi_category_tr_6,sushi_category_tr_7,sushi_category_tr_"+attr+"', 'hide,hide,hide,hide,hide,hide,hide,show')");}
else{attr=(params.lnk_attr&&params.lnk_attr[i])?",'"+params.lnk_attr[i]+"'":"";images[i].onclick=new Function("var t='"+targ+"';if(window[t]){try{window[t].close()}catch(z){}}window[t]=window.open('"+params.links[i]+"',t"+attr+");window[t].focus()");}
images[i].style.cursor=document.all?'hand':'pointer';}
if(params.titles&&params.titles[i]&&params.titles[i]!='')
images[i].title=params.titles[i];if(document.all)
images[i].alt=images[i].title;images[i+params.images.length]=images[i];if(params.images.length==faces)
images[i+2*params.images.length]=images[i];cdiv.appendChild(images[i]);}
var face_size=params.size_mode=='image'?params[dimension]:params[dimension]*Math.sin(Math.PI/params.sides);var face_offset=params[dimension]*Math.cos(Math.PI/params.sides)/(params.size_mode=='image'?Math.sin(Math.PI/params.sides):1)/2-.5;var pi_piece=2*Math.PI/params.steps/params.sides;for(i=0;i<=params.steps*faces;i++){img_dimension[i]=face_size*Math.sin(pi_piece*i);img_position[i]=(i<params.steps*params.sides/2)?Math.floor(params[dimension]/2/(params.size_mode=='image'?Math.sin(Math.PI/params.sides):1)-face_offset*Math.cos(pi_piece*i)-img_dimension[i]/2)+'px':faraway;img_dimension[i]=img_dimension[i]-2*params.image_border_width>1?Math.ceil(img_dimension[i])-2*params.image_border_width+'px':'1px';}}
init();cdiv.rotate=function(){setTimeout('document.getElementById("'+cdiv.id+'").rotate()',interval);if(!spinning)return;if(++counter>=params.steps){counter=0;if(++img_index>=img_index_cap)
img_index=params.images.length;}
images[img_index-faces].style[direction]=faraway;for(var i=faces-1;i>=0;i--){images[img_index-i].style[direction]=img_position[counter+i*params.steps];images[img_index-i].style[dimension]=img_dimension[counter+i*params.steps];}}
cdiv.onmouseover=function(){spinning=false;}
cdiv.onmouseout=function(){spinning=true;}
setTimeout('document.getElementById("'+cdiv.id+'").rotate()',100);}
function is_array(input){return typeof(input)=='object'&&(input instanceof Array);}
var skPreloadedImage=new Array();var nthPreloadedPic=0;function skellos_preloadImages(myFilename){if(document.images){if(myFilename.match(/,/)){var myList=myFilename.split(',');myFilename=myList;}
if(is_array(myFilename)){for(var i=0;i<myFilename.length;i++){alert(myFilename[i]);skPreloadedImage[nthPreloadedPic]=new Image(15,15);skPreloadedImage[nthPreloadedPic].src=myFilename[i];nthPreloadedPic++;}}
else{skPreloadedImage[nthPreloadedPic]=new Image(15,15);skPreloadedImage[nthPreloadedPic].src=myFilename;nthPreloadedPic++;}}}
function showHide(elementId){if(document.getElementById(elementId).style.display=='none')document.getElementById(elementId).style.display='';else document.getElementById(elementId).style.display='none';}
var isStillInElementForMouseOver=new Array();function showAndHide(elementId,doWhat,isMouseOverBox){elementId=elementId.split(',');doWhat=doWhat.split(',');for(var i=0;i<elementId.length;i++){if(doWhat[i]=="show"){if(isMouseOverBox>0)isStillInElementForMouseOver[isMouseOverBox]=elementId[i];if(document.getElementById(elementId[i]))document.getElementById(elementId[i]).style.display='';if(document.getElementById(elementId[i]))document.getElementById(elementId[i]).style.zIndex='9999';}
else if(doWhat[i]=="hide"){isStillInElementForMouseOver[isMouseOverBox]='';if(isMouseOverBox>0)setTimeout('showAndHide_delayed(\''+elementId[i]+'\')',50);else if(document.getElementById(elementId[i]))document.getElementById(elementId[i]).style.display='none';}
else if(document.getElementById(elementId[i])){if(document.getElementById(elementId[i]).style.display=='none')document.getElementById(elementId[i]).style.display='';else document.getElementById(elementId[i]).style.display='none';}}}
function showAndHide_delayed(myElement){var foundId=0;for(var i=1;i<=isStillInElementForMouseOver.length;i++){if(isStillInElementForMouseOver[i]==myElement)foundId=1;}
if(foundId==0)document.getElementById(myElement).style.display='none';}
function buttonLoaderSwitch(elementId){if(document.getElementById(elementId))document.getElementById(elementId).innerHTML='<img src="'+JS_AJAXLOADER_BUTTON+'" alt="loading" />';}
var whichDivShowing='NA';var activateMouseDownScript='NA';var cropingImageNthLoop=0;var cropingThisImage='NA';var showClickIs='ON';if(navigator.appName.indexOf("Microsoft")!=-1)var IE=true;else var IE=false;if(!IE)document.addEventListener("mousemove",getMouseXY,false);document.onmousemove=getMouseXY;var tempX=0
var tempY=0
function getMouseXY(e){if(document.getElementById('div_jigsaw3_exists'))jigsawMovements_getMouseXY();if(IE){tempX=event.clientX+document.body.scrollLeft
tempY=event.clientY+document.body.scrollTop}else{tempX=e.pageX
tempY=e.pageY}
if(tempX<0){tempX=0}
if(tempY<0){tempY=0}
if(whichDivShowing!='NA'&&showClickIs=="ON"){if(document.getElementById(whichDivShowing).style.marginTop)var mTop=parseInt(document.getElementById(whichDivShowing).style.marginTop.replace(/px/,''));else mTop=0;if(document.getElementById(whichDivShowing).style.marginLeft)var mLeft=parseInt(document.getElementById(whichDivShowing).style.marginLeft.replace(/px/,''));else mLeft=0;var diffH=0;var diffW=0;var myWindowSize=getWindowSize();var myScrollOffset=getScrollOffset();var myBoxHeight=document.getElementById(whichDivShowing).offsetHeight;if(tempY+mTop+myBoxHeight>=myWindowSize["height"]+myScrollOffset["top"]-65){diffH=(tempY+mTop+myBoxHeight)-(myWindowSize["height"]+myScrollOffset["top"]-65);mTop=mTop-diffH;}
var myBoxWidth=document.getElementById(whichDivShowing).offsetWidth;if(tempX+mLeft+myBoxWidth>=myWindowSize["width"]+myScrollOffset["left"]-30){diffW=(tempX+mLeft+myBoxWidth)-(myWindowSize["width"]+myScrollOffset["left"]-30);mLeft=mLeft-diffW;}
if(diffH>0&&diffW>0)mLeft=0-(myBoxWidth+10);document.getElementById(whichDivShowing).style.top=tempY+mTop;document.getElementById(whichDivShowing).style.left=tempX+mLeft;if(IE)document.getElementById(whichDivShowing).style.position='fixed';document.getElementById(whichDivShowing).style.display='';}
if(document.getElementById('div_showmousemoveX'))document.getElementById('div_showmousemoveX').value=tempX;if(document.getElementById('div_showmousemoveY'))document.getElementById('div_showmousemoveY').value=tempY;if(activateMouseDownScript!='NA'){if(activateMouseDownScript=='cropImage')moveCropSquare();}
return true}
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;var swfobject=function(){var UNDEF="undefined",OBJECT="object",SHOCKWAVE_FLASH="Shockwave Flash",SHOCKWAVE_FLASH_AX="ShockwaveFlash.ShockwaveFlash",FLASH_MIME_TYPE="application/x-shockwave-flash",EXPRESS_INSTALL_ID="SWFObjectExprInst",ON_READY_STATE_CHANGE="onreadystatechange",win=window,doc=document,nav=navigator,plugin=false,domLoadFnArr=[main],regObjArr=[],objIdArr=[],listenersArr=[],storedAltContent,storedAltContentId,storedCallbackFn,storedCallbackObj,isDomLoaded=false,isExpressInstallActive=false,dynamicStylesheet,dynamicStylesheetMedia,autoHideShow=true,ua=function(){var w3cdom=typeof doc.getElementById!=UNDEF&&typeof doc.getElementsByTagName!=UNDEF&&typeof doc.createElement!=UNDEF,u=nav.userAgent.toLowerCase(),p=nav.platform.toLowerCase(),windows=p?/win/.test(p):/win/.test(u),mac=p?/mac/.test(p):/mac/.test(u),webkit=/webkit/.test(u)?parseFloat(u.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,ie=!+"\v1",playerVersion=[0,0,0],d=null;if(typeof nav.plugins!=UNDEF&&typeof nav.plugins[SHOCKWAVE_FLASH]==OBJECT){d=nav.plugins[SHOCKWAVE_FLASH].description;if(d&&!(typeof nav.mimeTypes!=UNDEF&&nav.mimeTypes[FLASH_MIME_TYPE]&&!nav.mimeTypes[FLASH_MIME_TYPE].enabledPlugin)){plugin=true;ie=false;d=d.replace(/^.*\s+(\S+\s+\S+$)/,"$1");playerVersion[0]=parseInt(d.replace(/^(.*)\..*$/,"$1"),10);playerVersion[1]=parseInt(d.replace(/^.*\.(.*)\s.*$/,"$1"),10);playerVersion[2]=/[a-zA-Z]/.test(d)?parseInt(d.replace(/^.*[a-zA-Z]+(.*)$/,"$1"),10):0;}}
else if(typeof win.ActiveXObject!=UNDEF){try{var a=new ActiveXObject(SHOCKWAVE_FLASH_AX);if(a){d=a.GetVariable("$version");if(d){ie=true;d=d.split(" ")[1].split(",");playerVersion=[parseInt(d[0],10),parseInt(d[1],10),parseInt(d[2],10)];}}}
catch(e){}}
return{w3:w3cdom,pv:playerVersion,wk:webkit,ie:ie,win:windows,mac:mac};}(),onDomLoad=function(){if(!ua.w3){return;}
if((typeof doc.readyState!=UNDEF&&doc.readyState=="complete")||(typeof doc.readyState==UNDEF&&(doc.getElementsByTagName("body")[0]||doc.body))){callDomLoadFunctions();}
if(!isDomLoaded){if(typeof doc.addEventListener!=UNDEF){doc.addEventListener("DOMContentLoaded",callDomLoadFunctions,false);}
if(ua.ie&&ua.win){doc.attachEvent(ON_READY_STATE_CHANGE,function(){if(doc.readyState=="complete"){doc.detachEvent(ON_READY_STATE_CHANGE,arguments.callee);callDomLoadFunctions();}});if(win==top){(function(){if(isDomLoaded){return;}
try{doc.documentElement.doScroll("left");}
catch(e){setTimeout(arguments.callee,0);return;}
callDomLoadFunctions();})();}}
if(ua.wk){(function(){if(isDomLoaded){return;}
if(!/loaded|complete/.test(doc.readyState)){setTimeout(arguments.callee,0);return;}
callDomLoadFunctions();})();}
addLoadEvent(callDomLoadFunctions);}}();function callDomLoadFunctions(){if(isDomLoaded){return;}
try{var t=doc.getElementsByTagName("body")[0].appendChild(createElement("span"));t.parentNode.removeChild(t);}
catch(e){return;}
isDomLoaded=true;var dl=domLoadFnArr.length;for(var i=0;i<dl;i++){domLoadFnArr[i]();}}
function addDomLoadEvent(fn){if(isDomLoaded){fn();}
else{domLoadFnArr[domLoadFnArr.length]=fn;}}
function addLoadEvent(fn){if(typeof win.addEventListener!=UNDEF){win.addEventListener("load",fn,false);}
else if(typeof doc.addEventListener!=UNDEF){doc.addEventListener("load",fn,false);}
else if(typeof win.attachEvent!=UNDEF){addListener(win,"onload",fn);}
else if(typeof win.onload=="function"){var fnOld=win.onload;win.onload=function(){fnOld();fn();};}
else{win.onload=fn;}}
function main(){if(plugin){testPlayerVersion();}
else{matchVersions();}}
function testPlayerVersion(){var b=doc.getElementsByTagName("body")[0];var o=createElement(OBJECT);o.setAttribute("type",FLASH_MIME_TYPE);var t=b.appendChild(o);if(t){var counter=0;(function(){if(typeof t.GetVariable!=UNDEF){var d=t.GetVariable("$version");if(d){d=d.split(" ")[1].split(",");ua.pv=[parseInt(d[0],10),parseInt(d[1],10),parseInt(d[2],10)];}}
else if(counter<10){counter++;setTimeout(arguments.callee,10);return;}
b.removeChild(o);t=null;matchVersions();})();}
else{matchVersions();}}
function matchVersions(){var rl=regObjArr.length;if(rl>0){for(var i=0;i<rl;i++){var id=regObjArr[i].id;var cb=regObjArr[i].callbackFn;var cbObj={success:false,id:id};if(ua.pv[0]>0){var obj=getElementById(id);if(obj){if(hasPlayerVersion(regObjArr[i].swfVersion)&&!(ua.wk&&ua.wk<312)){setVisibility(id,true);if(cb){cbObj.success=true;cbObj.ref=getObjectById(id);cb(cbObj);}}
else if(regObjArr[i].expressInstall&&canExpressInstall()){var att={};att.data=regObjArr[i].expressInstall;att.width=obj.getAttribute("width")||"0";att.height=obj.getAttribute("height")||"0";if(obj.getAttribute("class")){att.styleclass=obj.getAttribute("class");}
if(obj.getAttribute("align")){att.align=obj.getAttribute("align");}
var par={};var p=obj.getElementsByTagName("param");var pl=p.length;for(var j=0;j<pl;j++){if(p[j].getAttribute("name").toLowerCase()!="movie"){par[p[j].getAttribute("name")]=p[j].getAttribute("value");}}
showExpressInstall(att,par,id,cb);}
else{displayAltContent(obj);if(cb){cb(cbObj);}}}}
else{setVisibility(id,true);if(cb){var o=getObjectById(id);if(o&&typeof o.SetVariable!=UNDEF){cbObj.success=true;cbObj.ref=o;}
cb(cbObj);}}}}}
function getObjectById(objectIdStr){var r=null;var o=getElementById(objectIdStr);if(o&&o.nodeName=="OBJECT"){if(typeof o.SetVariable!=UNDEF){r=o;}
else{var n=o.getElementsByTagName(OBJECT)[0];if(n){r=n;}}}
return r;}
function canExpressInstall(){return!isExpressInstallActive&&hasPlayerVersion("6.0.65")&&(ua.win||ua.mac)&&!(ua.wk&&ua.wk<312);}
function showExpressInstall(att,par,replaceElemIdStr,callbackFn){isExpressInstallActive=true;storedCallbackFn=callbackFn||null;storedCallbackObj={success:false,id:replaceElemIdStr};var obj=getElementById(replaceElemIdStr);if(obj){if(obj.nodeName=="OBJECT"){storedAltContent=abstractAltContent(obj);storedAltContentId=null;}
else{storedAltContent=obj;storedAltContentId=replaceElemIdStr;}
att.id=EXPRESS_INSTALL_ID;if(typeof att.width==UNDEF||(!/%$/.test(att.width)&&parseInt(att.width,10)<310)){att.width="310";}
if(typeof att.height==UNDEF||(!/%$/.test(att.height)&&parseInt(att.height,10)<137)){att.height="137";}
doc.title=doc.title.slice(0,47)+" - Flash Player Installation";var pt=ua.ie&&ua.win?"ActiveX":"PlugIn",fv="MMredirectURL="+win.location.toString().replace(/&/g,"%26")+"&MMplayerType="+pt+"&MMdoctitle="+doc.title;if(typeof par.flashvars!=UNDEF){par.flashvars+="&"+fv;}
else{par.flashvars=fv;}
if(ua.ie&&ua.win&&obj.readyState!=4){var newObj=createElement("div");replaceElemIdStr+="SWFObjectNew";newObj.setAttribute("id",replaceElemIdStr);obj.parentNode.insertBefore(newObj,obj);obj.style.display="none";(function(){if(obj.readyState==4){obj.parentNode.removeChild(obj);}
else{setTimeout(arguments.callee,10);}})();}
createSWF(att,par,replaceElemIdStr);}}
function displayAltContent(obj){if(ua.ie&&ua.win&&obj.readyState!=4){var el=createElement("div");obj.parentNode.insertBefore(el,obj);el.parentNode.replaceChild(abstractAltContent(obj),el);obj.style.display="none";(function(){if(obj.readyState==4){obj.parentNode.removeChild(obj);}
else{setTimeout(arguments.callee,10);}})();}
else{obj.parentNode.replaceChild(abstractAltContent(obj),obj);}}
function abstractAltContent(obj){var ac=createElement("div");if(ua.win&&ua.ie){ac.innerHTML=obj.innerHTML;}
else{var nestedObj=obj.getElementsByTagName(OBJECT)[0];if(nestedObj){var c=nestedObj.childNodes;if(c){var cl=c.length;for(var i=0;i<cl;i++){if(!(c[i].nodeType==1&&c[i].nodeName=="PARAM")&&!(c[i].nodeType==8)){ac.appendChild(c[i].cloneNode(true));}}}}}
return ac;}
function createSWF(attObj,parObj,id){var r,el=getElementById(id);if(ua.wk&&ua.wk<312){return r;}
if(el){if(typeof attObj.id==UNDEF){attObj.id=id;}
if(ua.ie&&ua.win){var att="";for(var i in attObj){if(attObj[i]!=Object.prototype[i]){if(i.toLowerCase()=="data"){parObj.movie=attObj[i];}
else if(i.toLowerCase()=="styleclass"){att+=' class="'+attObj[i]+'"';}
else if(i.toLowerCase()!="classid"){att+=' '+i+'="'+attObj[i]+'"';}}}
var par="";for(var j in parObj){if(parObj[j]!=Object.prototype[j]){par+='<param name="'+j+'" value="'+parObj[j]+'" />';}}
el.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+att+'>'+par+'</object>';objIdArr[objIdArr.length]=attObj.id;r=getElementById(attObj.id);}
else{var o=createElement(OBJECT);o.setAttribute("type",FLASH_MIME_TYPE);for(var m in attObj){if(attObj[m]!=Object.prototype[m]){if(m.toLowerCase()=="styleclass"){o.setAttribute("class",attObj[m]);}
else if(m.toLowerCase()!="classid"){o.setAttribute(m,attObj[m]);}}}
for(var n in parObj){if(parObj[n]!=Object.prototype[n]&&n.toLowerCase()!="movie"){createObjParam(o,n,parObj[n]);}}
el.parentNode.replaceChild(o,el);r=o;}}
return r;}
function createObjParam(el,pName,pValue){var p=createElement("param");p.setAttribute("name",pName);p.setAttribute("value",pValue);el.appendChild(p);}
function removeSWF(id){var obj=getElementById(id);if(obj&&obj.nodeName=="OBJECT"){if(ua.ie&&ua.win){obj.style.display="none";(function(){if(obj.readyState==4){removeObjectInIE(id);}
else{setTimeout(arguments.callee,10);}})();}
else{obj.parentNode.removeChild(obj);}}}
function removeObjectInIE(id){var obj=getElementById(id);if(obj){for(var i in obj){if(typeof obj[i]=="function"){obj[i]=null;}}
obj.parentNode.removeChild(obj);}}
function getElementById(id){var el=null;try{el=doc.getElementById(id);}
catch(e){}
return el;}
function createElement(el){return doc.createElement(el);}
function addListener(target,eventType,fn){target.attachEvent(eventType,fn);listenersArr[listenersArr.length]=[target,eventType,fn];}
function hasPlayerVersion(rv){var pv=ua.pv,v=rv.split(".");v[0]=parseInt(v[0],10);v[1]=parseInt(v[1],10)||0;v[2]=parseInt(v[2],10)||0;return(pv[0]>v[0]||(pv[0]==v[0]&&pv[1]>v[1])||(pv[0]==v[0]&&pv[1]==v[1]&&pv[2]>=v[2]))?true:false;}
function createCSS(sel,decl,media,newStyle){if(ua.ie&&ua.mac){return;}
var h=doc.getElementsByTagName("head")[0];if(!h){return;}
var m=(media&&typeof media=="string")?media:"screen";if(newStyle){dynamicStylesheet=null;dynamicStylesheetMedia=null;}
if(!dynamicStylesheet||dynamicStylesheetMedia!=m){var s=createElement("style");s.setAttribute("type","text/css");s.setAttribute("media",m);dynamicStylesheet=h.appendChild(s);if(ua.ie&&ua.win&&typeof doc.styleSheets!=UNDEF&&doc.styleSheets.length>0){dynamicStylesheet=doc.styleSheets[doc.styleSheets.length-1];}
dynamicStylesheetMedia=m;}
if(ua.ie&&ua.win){if(dynamicStylesheet&&typeof dynamicStylesheet.addRule==OBJECT){dynamicStylesheet.addRule(sel,decl);}}
else{if(dynamicStylesheet&&typeof doc.createTextNode!=UNDEF){dynamicStylesheet.appendChild(doc.createTextNode(sel+" {"+decl+"}"));}}}
function setVisibility(id,isVisible){if(!autoHideShow){return;}
var v=isVisible?"visible":"hidden";if(isDomLoaded&&getElementById(id)){getElementById(id).style.visibility=v;}
else{createCSS("#"+id,"visibility:"+v);}}
function urlEncodeIfNecessary(s){var regex=/[\\\"<>\.;]/;var hasBadChars=regex.exec(s)!=null;return hasBadChars&&typeof encodeURIComponent!=UNDEF?encodeURIComponent(s):s;}
var cleanup=function(){if(ua.ie&&ua.win){window.attachEvent("onunload",function(){var ll=listenersArr.length;for(var i=0;i<ll;i++){listenersArr[i][0].detachEvent(listenersArr[i][1],listenersArr[i][2]);}
var il=objIdArr.length;for(var j=0;j<il;j++){removeSWF(objIdArr[j]);}
for(var k in ua){ua[k]=null;}
ua=null;for(var l in swfobject){swfobject[l]=null;}
swfobject=null;});}}();return{registerObject:function(objectIdStr,swfVersionStr,xiSwfUrlStr,callbackFn){if(ua.w3&&objectIdStr&&swfVersionStr){var regObj={};regObj.id=objectIdStr;regObj.swfVersion=swfVersionStr;regObj.expressInstall=xiSwfUrlStr;regObj.callbackFn=callbackFn;regObjArr[regObjArr.length]=regObj;setVisibility(objectIdStr,false);}
else if(callbackFn){callbackFn({success:false,id:objectIdStr});}},getObjectById:function(objectIdStr){if(ua.w3){return getObjectById(objectIdStr);}},embedSWF:function(swfUrlStr,replaceElemIdStr,widthStr,heightStr,swfVersionStr,xiSwfUrlStr,flashvarsObj,parObj,attObj,callbackFn){var callbackObj={success:false,id:replaceElemIdStr};if(ua.w3&&!(ua.wk&&ua.wk<312)&&swfUrlStr&&replaceElemIdStr&&widthStr&&heightStr&&swfVersionStr){setVisibility(replaceElemIdStr,false);addDomLoadEvent(function(){widthStr+="";heightStr+="";var att={};if(attObj&&typeof attObj===OBJECT){for(var i in attObj){att[i]=attObj[i];}}
att.data=swfUrlStr;att.width=widthStr;att.height=heightStr;var par={};if(parObj&&typeof parObj===OBJECT){for(var j in parObj){par[j]=parObj[j];}}
if(flashvarsObj&&typeof flashvarsObj===OBJECT){for(var k in flashvarsObj){if(typeof par.flashvars!=UNDEF){par.flashvars+="&"+k+"="+flashvarsObj[k];}
else{par.flashvars=k+"="+flashvarsObj[k];}}}
if(hasPlayerVersion(swfVersionStr)){var obj=createSWF(att,par,replaceElemIdStr);if(att.id==replaceElemIdStr){setVisibility(replaceElemIdStr,true);}
callbackObj.success=true;callbackObj.ref=obj;}
else if(xiSwfUrlStr&&canExpressInstall()){att.data=xiSwfUrlStr;showExpressInstall(att,par,replaceElemIdStr,callbackFn);return;}
else{setVisibility(replaceElemIdStr,true);}
if(callbackFn){callbackFn(callbackObj);}});}
else if(callbackFn){callbackFn(callbackObj);}},switchOffAutoHideShow:function(){autoHideShow=false;},ua:ua,getFlashPlayerVersion:function(){return{major:ua.pv[0],minor:ua.pv[1],release:ua.pv[2]};},hasFlashPlayerVersion:hasPlayerVersion,createSWF:function(attObj,parObj,replaceElemIdStr){if(ua.w3){return createSWF(attObj,parObj,replaceElemIdStr);}
else{return undefined;}},showExpressInstall:function(att,par,replaceElemIdStr,callbackFn){if(ua.w3&&canExpressInstall()){showExpressInstall(att,par,replaceElemIdStr,callbackFn);}},removeSWF:function(objElemIdStr){if(ua.w3){removeSWF(objElemIdStr);}},createCSS:function(selStr,declStr,mediaStr,newStyleBoolean){if(ua.w3){createCSS(selStr,declStr,mediaStr,newStyleBoolean);}},addDomLoadEvent:addDomLoadEvent,addLoadEvent:addLoadEvent,getQueryParamValue:function(param){var q=doc.location.search||doc.location.hash;if(q){if(/\?/.test(q)){q=q.split("?")[1];}
if(param==null){return urlEncodeIfNecessary(q);}
var pairs=q.split("&");for(var i=0;i<pairs.length;i++){if(pairs[i].substring(0,pairs[i].indexOf("="))==param){return urlEncodeIfNecessary(pairs[i].substring((pairs[i].indexOf("=")+1)));}}}
return"";},expressInstallCallback:function(){if(isExpressInstallActive){var obj=getElementById(EXPRESS_INSTALL_ID);if(obj&&storedAltContent){obj.parentNode.replaceChild(storedAltContent,obj);if(storedAltContentId){setVisibility(storedAltContentId,true);if(ua.ie&&ua.win){storedAltContent.style.display="block";}}
if(storedCallbackFn){storedCallbackFn(storedCallbackObj);}}
isExpressInstallActive=false;}}};}();var ajax=new ajaxObject();var JS_SITE_URL='SITE_URL';var JS_SCRIPT_URI_REFER_FRIEND='http://SITE_URL';var JS_SITE_THEME='SITE_THEME';var listSimpleTags=new Array();var listToReplaceBy=new Array();var listImageExtention=new Array();function ucfirst(s){s+='';var f=s.charAt(0).toUpperCase();return f+s.substr(1);}
var actualSiteUrl='SITE_URL';var actualPageId='';var userStatus='';if(typeof(voidfunction)!='object'){voidfunction={timers:{},getProportionalResize:function(sizeInfo,maxSizeInfo,forceGrow){forceGrow=forceGrow!=undefined?(forceGrow?true:false):false;ratioW=maxSizeInfo.width/sizeInfo.width;ratioH=maxSizeInfo.height/sizeInfo.height;if(maxSizeInfo.width==0){ratio=ratioH;}
else if(maxSizeInfo.height==0){ratio=ratioW;}
else{ratio=Math.min(ratioH,ratioW);}
sizeInfo.imageRatio=sizeInfo.width/sizeInfo.height;if(ratio<1||forceGrow){sizeInfo.width=Math.floor(ratio*sizeInfo.width);sizeInfo.height=Math.floor(ratio*sizeInfo.height);sizeInfo.ratio=ratio;sizeInfo.sizeChanged=ratio!==1;}
return sizeInfo;},getRandomId:function(prefix){return(prefix!=undefined?prefix:'')+Math.floor(Math.random()*100000);},substr_replace:function(str,replace,start,length){if(start<0){length=start+str.length;start=0;}
length=length!==undefined?length:0;return str.slice(0,start)+replace+str.slice(start+length);},secondToTimeArray:function(seconds){seconds=Math.round(seconds);if(!is_numeric(seconds))return false;var days=Math.floor(seconds/(60*60*24));seconds-=days*(60*60*24);hours=Math.floor(seconds/(60*60));seconds-=hours*(60*60);minutes=Math.floor(seconds/(60));seconds-=minutes*(60);return{'d':days,'h':hours,'m':minutes,'s':seconds,'days':days,'hours':hours,'minutes':minutes,'seconds':seconds,'day':days,'hour':hours,'minute':minutes,'second':seconds};},basename:function(path,suffix){var b=path.replace(/^.*[\/\\]/,'');if(typeof(suffix)=='string'&&b.substr(b.length-suffix.length)==suffix){b=b.substr(0,b.length-suffix.length);}
return b;},pathInfo:function(path){return voidfunction.pathinfo(path);},pathinfo:function(path){var result=/^(.*[\\/\\\\])?((.*)?\.(.*)?)?$/.exec(path);if(!result)return{};var obj={'string':result[0],'path':result[1]?result[1]:'','basename':result[2]?result[2]:'','filename':result[3]?result[3]:'','extension':result[4]?result[4]:''};return obj;},isTbodyEmpty:function(tbody){var empty=true;for(var i in tbody.childNodes){if(tbody.childNodes[i]!=undefined)
if(tbody.childNodes[i].tagName!=undefined)
if(tbody.childNodes[i].tagName.toLowerCase()=='tr'){empty=false;break;}}
return empty;},shortcut:function(shortcut,callback,opt){var default_options={'type':'keydown','propagate':false,'target':document}
if(!opt)opt=default_options;else{for(var dfo in default_options){if(typeof opt[dfo]=='undefined')opt[dfo]=default_options[dfo];}}
var ele=opt.target
if(typeof opt.target=='string')ele=document.getElementById(opt.target);var ths=this;var func=function(e){e=e||window.event;if(e.keyCode)code=e.keyCode;else if(e.which)code=e.which;var character=String.fromCharCode(code).toLowerCase();var keys=shortcut.toLowerCase().split("+");var kp=0;var shift_nums={"`":"~","1":"!","2":"@","3":"#","4":"$","5":"%","6":"^","7":"&","8":"*","9":"(","0":")","-":"_","=":"+",";":":","'":"\"",",":"<",".":">","/":"?","\\":"|"}
var special_keys={'esc':27,'escape':27,'tab':9,'space':32,'return':13,'enter':13,'backspace':8,'scrolllock':145,'scroll_lock':145,'scroll':145,'capslock':20,'caps_lock':20,'caps':20,'numlock':144,'num_lock':144,'num':144,'pause':19,'break':19,'insert':45,'home':36,'delete':46,'end':35,'pageup':33,'page_up':33,'pu':33,'pagedown':34,'page_down':34,'pd':34,'left':37,'up':38,'right':39,'down':40,'f1':112,'f2':113,'f3':114,'f4':115,'f5':116,'f6':117,'f7':118,'f8':119,'f9':120,'f10':121,'f11':122,'f12':123}
for(var i=0;k=keys[i],i<keys.length;i++){if(k=='ctrl'||k=='control'){if(e.ctrlKey)kp++;}else if(k=='shift'){if(e.shiftKey)kp++;}else if(k=='alt'){if(e.altKey)kp++;}else if(k.length>1){if(special_keys[k]==code)kp++;}else{if(character==k)kp++;else{if(shift_nums[character]&&e.shiftKey){character=shift_nums[character];if(character==k)kp++;}}}}
if(kp==keys.length){callback(e);if(!opt['propagate']){e.cancelBubble=true;e.returnValue=false;if(e.stopPropagation){e.stopPropagation();e.preventDefault();}
return false;}}}
if(ele.addEventListener)ele.addEventListener(opt['type'],func,false);else if(ele.attachEvent)ele.attachEvent('on'+opt['type'],func);else ele['on'+opt['type']]=func;},sprintf:function(){if(!arguments||arguments.length<1||!RegExp){return;}
var str=arguments[0];var re=/([^%]*)%((\d+)\$)?('.|0|\x20)?(-)?(\d+)?(\.\d+)?(%|b|c|d|u|f|o|s|x|X)(.*)/;var a=b=[],numSubstitutions=0,numMatches=0;while(a=re.exec(str)){var leftpart=a[1],pPad=a[4],pJustify=a[5],pMinLength=a[6];var pPrecision=a[7],pType=a[8],rightPart=a[9];var position=a[3];numMatches++;if(pType=='%'){subst='%';}
else{numSubstitutions++;if(position==undefined||position==''){position=numSubstitutions;}
if(position>=arguments.length){alert('Error! Not enough function arguments ('+(arguments.length-1)+', excluding the string)\nfor the number of substitution parameters in string ('+position+' so far).');}
var param=arguments[position];var pad='';if(pPad&&pPad.substr(0,1)=="'")pad=leftpart.substr(1,1);else if(pPad)pad=pPad;var justifyRight=true;if(pJustify&&pJustify==="-")justifyRight=false;var minLength=-1;if(pMinLength)minLength=parseInt(pMinLength);var precision=-1;if(pPrecision&&pType=='f')precision=parseInt(pPrecision.substring(1));var subst=param;if(pType=='b')subst=parseInt(param).toString(2);else if(pType=='c')subst=String.fromCharCode(parseInt(param));else if(pType=='d')subst=parseInt(param)?parseInt(param):0;else if(pType=='u')subst=Math.abs(param);else if(pType=='f'){var tempNum=new String((precision>-1)?Math.round(parseFloat(param)*Math.pow(10,precision))/Math.pow(10,precision):parseFloat(param));var missingZeros=tempNum.length-tempNum.indexOf('.')-1;for(var i=1;i<=missingZeros;i++)
tempNum+='0';subst=tempNum;}
else if(pType=='o')subst=parseInt(param).toString(8);else if(pType=='s')subst=param;else if(pType=='x')subst=(''+parseInt(param).toString(16)).toLowerCase();else if(pType=='X')subst=(''+parseInt(param).toString(16)).toUpperCase();}
str=leftpart+subst+rightPart;}
return str;},zeroPad:function(number,digits){number=String(number);while(number.length<digits)number='0'+number;return number;},css_setClass:function(id,className,remove){if(typeof(id)=="object"){for(var i=0;i<id.length;i++){voidfunction.css_setClass(id[i],className,remove);}
el=id;}
else if(typeof(id)=="string"){var el=document.getElementById(id);}
if(el==undefined||el.tagName==undefined)return false;replaceText=((remove==true)?'':' '+className);if(el.className==className){el.className=replaceText;}
else{pattern=new RegExp('\\b'+className+'\\b','g');el.className=voidfunction.trim(el.className.replace(pattern,'')+replaceText);}
return true;},ltrim:function(value){return value.replace(/^\s*/,'');},rtrim:function(value){return value.replace(/\s*$/,'');},trim:function(value){return voidfunction.ltrim(voidfunction.rtrim(value));},addEvent:function(el,eventName,callback){if(!el){return 0;}
if(typeof(el)!="object"){el=document.getElementById(el);}
if(el==null||typeof(el)!="object"){return;}
if(el.attachEvent){el.attachEvent("on"+eventName,callback);}else if(el.addEventListener){el.addEventListener(eventName,callback,true);}else{el["on"+eventName]=callback;}},removeEvent:function(el,eventName,callback){if(el.detachEvent){el.detachEvent("on"+eventName,callback);}else if(el.removeEventListener){el.removeEventListener(eventName,callback,true);}else{el["on"+eventName]=null;}},stopEvent:function(ev){ev||(ev=window.event);if(ev.detachEvent){ev.cancelBubble=true;ev.returnValue=false;}else{ev.preventDefault();ev.stopPropagation();}
return false;},toggle:function(targetElement){if(typeof(targetElement)!='object'&&targetElement!=""&&targetElement!=null&&targetElement!=undefined)
targetElement=document.getElementById(targetElement);if(typeof(targetElement)!='object'||targetElement==null)return false;if(targetElement.style.display=="none"){voidfunction.toggleOn(targetElement);}
else{voidfunction.toggleOff(targetElement);}},toggleOn:function(targetElement){if(typeof(targetElement)!='object'){targetElement=document.getElementById(targetElement);}
if(targetElement==null||typeof(targetElement)!='object')return false;targetElement.style.display="";},toggleOff:function(targetElement){if(typeof(targetElement)!='object')
targetElement=document.getElementById(targetElement);if(typeof(targetElement)!='object'||targetElement==null)return false;targetElement.style.display="none";},delayedToggleOn:function(targetElement,timeoutTime){if(typeof(targetElement)!='object')
targetElement=document.getElementById(targetElement);if(typeof(targetElement)!='object'||targetElement==null)return false;if(!(timeoutTime>0))return false;if(targetElement.id=='')targetElement.id=this.getRandomId('timeoutNeedsId');if(this.timers[targetElement.id])clearTimeout(this.timers[targetElement.id]);this.timers[targetElement.id]=setTimeout(function(){voidfunction.toggleOn(targetElement);},timeoutTime);},delayedToggleOff:function(targetElement,timeoutTime){if(typeof(targetElement)!='object')
targetElement=document.getElementById(targetElement);if(typeof(targetElement)!='object'||targetElement==null)return false;if(!(timeoutTime>0))return false;if(targetElement.id=='')targetElement.id=this.getRandomId('timeoutNeedsId');if(this.timers[targetElement.id])clearTimeout(this.timers[targetElement.id]);this.timers[targetElement.id]=setTimeout(function(){voidfunction.toggleOff(targetElement);},timeoutTime);},delayedToggle:function(targetElement,timeoutTime){if(typeof(targetElement)!='object')
targetElement=document.getElementById(targetElement);if(typeof(targetElement)!='object'||targetElement==null)return false;if(!(timeoutTime>0))return false;if(targetElement.id=='')targetElement.id=this.getRandomId('timeoutNeedsId');if(this.timers[targetElement.id])clearTimeout(this.timers[targetElement.id]);this.timers[targetElement.id]=setTimeout(function(){voidfunction.toggle(targetElement);},timeoutTime);},clearToggleTimeout:function(targetElement){if(typeof(targetElement)!='object')
targetElement=document.getElementById(targetElement);if(typeof(targetElement)!='object'||targetElement==null)return false;if(this.timers[targetElement.id])clearTimeout(this.timers[targetElement.id]);},isHidden:function(targetElement){if(typeof(targetElement)!='object')
targetElement=document.getElementById(targetElement);if(targetElement==null||typeof(targetElement)!='object')return false;return targetElement.style.display=="none";},sleep:function(millisecond){var naptime=millisecond;var sleeping=true;var now=new Date();var startingMSeconds=now.getTime();while(sleeping){now=new Date();if(now.getTime()-startingMSeconds>naptime){sleeping=false;}}}}}
Date.prototype.modify=function(param){if(typeof(param)!='string')
return null;var direction='+';pattern=/(\-|\+)?(\d+) (MILLISECONDS?|SECONDS?|MINUTES?|HOURS?|DAYS?|MONTHS?|YEARS?)/ig;split=pattern.exec(param);while(split!=null){if(split[1]==undefined){split[1]='+';}
var interval=0;switch(split[3].toLowerCase()){case'millisecond':case'milliseconds':interval=1;break;case'second':case'seconds':interval=1000;break;case'minute':case'minutes':interval=1000*60;break;case'hour':case'hours':interval=1000*60*60;break;case'day':case'days':interval=1000*60*60*24;break;case'month':case'months':this.setUTCMonth(this.getUTCMonth()+(split[2]*(split[1]=='-'?-1:1)));interval=0;break;case'year':case'years':this.setUTCFullYear(this.getUTCFullYear()+(split[2]*(split[1]=='-'?-1:1)));interval=0;break;}
if(interval>0){var newDate=new Date(this.timestamp()+((interval*split[2])*(split[1]=='-'?-1:1)));this.setUTCHours(newDate.getUTCHours(),newDate.getUTCMinutes(),newDate.getUTCSeconds(),newDate.getUTCMilliseconds());this.setUTCDate(newDate.getUTCDate());this.setUTCMonth(newDate.getUTCMonth());this.setUTCFullYear(newDate.getUTCFullYear()<1000?newDate.getUTCFullYear()+1900:newDate.getUTCFullYear());}
split=pattern.exec(param);}
return this;}
Date.prototype.timestamp=function(){return Date.UTC(this.getUTCFullYear()<1000?this.getUTCFullYear()+1900:this.getUTCFullYear(),this.getUTCMonth(),this.getUTCDate(),this.getUTCHours(),this.getUTCMinutes(),this.getUTCSeconds(),this.getUTCMilliseconds());}
Date.prototype.getTimestamp=Date.prototype.timestamp;Date.prototype.strftime=function(formatStr){var format=function(d,code){if(Date.prototype.strftime.formatShortcuts[code]){return d.strftime(Date.prototype.strftime.formatShortcuts[code]);}else{var getter=(Date.prototype.strftime.formatCodes[code]||'').split('.');var nbr=d['get'+getter[0]]?d['get'+getter[0]]():'';if(getter[1])nbr=voidfunction.zeroPad(nbr,getter[1]);return nbr;}};var source=formatStr||'%Y-%m-%d',result='',match;while(source.length>0){if(match=source.match(Date.prototype.strftime.formatCodes.matcher)){result+=source.slice(0,match.index);result+=(match[1]||'')+format(this,match[2]);source=source.slice(match.index+match[0].length);}else{result+=source,source='';}}
return result;};Date.prototype.strftime.formatCodes={matcher:/()%(#?(%|[a-z]))/i,Y:'FullYear',y:'ShortYear.2',m:'MonthNumber.2','#m':'MonthNumber',B:'MonthName',b:'AbbrMonthName',d:'Date.2','#d':'Date',e:'Date',A:'DayName',a:'AbbrDayName',w:'Day',o:'DayOrdinal',H:'Hours.2','#H':'Hours',I:'Hours12.2','#I':'Hours12',p:'AmPm',M:'Minutes.2','#M':'Minutes',S:'Seconds.2','#S':'Seconds',s:'Unix',N:'Milliseconds.3','#N':'Milliseconds',O:'TimezoneOffset',Z:'TimezoneName',G:'GmtOffset'};Date.prototype.strftime.formatShortcuts={F:'%Y-%m-%d',T:'%H:%M:%S',X:'%H:%M:%S',x:'%m/%d/%y',D:'%m/%d/%y','#c':'%a %b %e %H:%M:%S %Y',v:'%e-%b-%Y',R:'%H:%M',r:'%I:%M:%S %p',t:'\t',n:'\n','%':'%'};Date.prototype.getMonthNumber=function(){return this.getMonth()+1;}
Array.prototype.implode=function(glue){var str='';for(i=0;i<this.length;i++){if(typeof(this[i])=='string'||typeof(this[i])=='number'||typeof(this[i])=='float'){str+=this[i];}
if(typeof(this[i])=='Array'){str+=this[i].implode(glue);}
if(i+1<this.length){str+=glue;}}
return str;}
String.prototype.repeat=function(num)
{return new Array(num+1).join(this);}
String.prototype.nl2br=function()
{return this.replace(/([^>\r\n]?)(\r\n|\n\r|\r|\n)/g,'$1<br />');}
String.prototype.br2nl=function()
{return this.replace(/<\s?br[^>]*>?\n?/g,"\n");}
function is_numeric(number){if(typeof(number)=='number')return true;if(number==undefined||number==null)return false;if(typeof(number)!='string')number=new String(number);return number.length==number.replace(/\D/,'').length;}
if(typeof(voidfunction)!='object'){voidfunction={};}
voidfunction.ajax=function(maxSumiltaniousConnectionParam){this.ajaxRequestArray=new Array();this.requestWaitList=new Array();this.expectedXML=false;this.async=true;this.maxSumiltaniousConnection=maxSumiltaniousConnectionParam;if(maxSumiltaniousConnectionParam==undefined){this.maxSumiltaniousConnection=10;}
this.replace=function(url,id,method,arg,loadingFunc,loadedFunc){var validate=document.getElementById(id);if(validate!=null){if(typeof(validate.innerHTML)!=undefined){this.request(url,id,method,arg,loadingFunc,loadedFunc);}}
else{this.callError(1,"replace ID is not valid",true);}}
this.request=function(url,callback,method,arg,loadingFunc,loadedFunc,replaceId){if(replaceId!=undefined){callback=replaceId;this.callError(-1,"Parameter replaceId should not be used anymore, use the callback parameter (2) with the Id to be replaced instead.",true);}
method=method.toLowerCase();if(url==""||url==undefined){this.callError(5,"AJAX: URL must be provided");return false;}
else if(callback==""||callback==undefined&&callback!=null){alert("Callback function must be provided");return false;}
else if(method!="post"&&method!="get"){alert("Method function must be provided and be POST or GET only");return false;}
var callbackArguments={};if(typeof(arg)=='object'){if(typeof(arg.loadingFunc)=='function'){loadingFunc=arg.loadingFunc;}
if(typeof(arg.loadedFunc)=='function'){loadedFunc=arg.loadedFunc;}
if(arg.callbackArguments!=undefined){callbackArguments=arg.callbackArguments;}
if(typeof(arg.sendingArguments)=='string'){arg=arg.sendingArguments;}
if(typeof(arg.arguments)=='string'){arg=arg.arguments;}}
var innerCallback=callback;var innerLoadingFunc=loadingFunc;var innerLoadedFunc=loadedFunc;var httpRequest=this.getHttpRequest();if(httpRequest&&(httpRequest.readyState==4||httpRequest.readyState==0)){try{if(typeof(innerLoadingFunc)=="function"){innerLoadingFunc();}
else if(typeof(outterLoadingFunc)=="function"){if(typeof(innerLoadingFunc)!=undefined)
outterLoadingFunc(innerLoadingFunc);else
outterLoadingFunc();}
if(arg==undefined){arg="";}
if(arg!="")arg+='&';arg+="xhr=true&IECacheProblem="+voidfunction.getTime();if(method=="get"){var urlComplete=url;if(arg!=undefined){urlComplete+=(urlComplete.indexOf('?')!=urlComplete.length-1?'?':'&')+arg;}
httpRequest.open("get",urlComplete,this.async);httpRequest.setRequestHeader("X-Requested-With","XMLHttpRequest");var readystatechange=getHandleStateChange(this)
httpRequest.onreadystatechange=readystatechange;httpRequest.send(' ');if(!this.async)
readystatechange();}
else{httpRequest.open("post",url,this.async);httpRequest.setRequestHeader("X-Requested-With","XMLHttpRequest");httpRequest.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset="+this.encoding);var readystatechange=getHandleStateChange(this);httpRequest.onreadystatechange=readystatechange;httpRequest.send(arg);if(!this.async)
readystatechange();}}
catch(e){this.callError(2,"An exception occurred in the script. Error name: "+e.name+". Error message: "+e.message,true);}}
else{this.requestWaitList.push(new Array(url,callback,method,arg,loadingFunc,loadedFunc));}
function getHandleStateChange(thisAjax){function handleStateChange(){if(httpRequest.readyState==4){if(httpRequest.status==200){var replaceId='';if(typeof(innerCallback)=='object'){if(typeof(innerCallback.replaceId)=='string'){replaceId=innerCallback.replaceId;}
if(typeof(innerCallback.callback)=='function'){innerCallback=innerCallback.callback;}}
else if(typeof(innerCallback)=='string'){replaceId=innerCallback;}
if(replaceId!=''){var text=httpRequest.responseText;var r=document.getElementById(replaceId);if(r){r.innerHTML=text;}}
if(typeof(innerLoadedFunc)=="function"){innerLoadedFunc();}
else if(typeof(outterLoadedFunc)=="function"){outterLoadedFunc(innerLoadedFunc!=undefined?innerLoadedFunc:innerLoadingFunc);}
if(typeof(innerCallback)=="function"){xmlResponse=httpRequest.responseXML;if(thisAjax.expectedXML){if(!xmlResponse||!xmlResponse.documentElement){thisAjax.callError(5,'AJAX Object reports: no XML returned or IE and Opera error',false);xmlResponse=false;}
if(xmlResponse.documentElement&&xmlResponse.documentElement.nodeName=='parseerror'){thisAjax.callError(6,'AJAX Object reports: no XML returned or Firefox and Opera error',false);xmlResponse=false;}}
var text=httpRequest.responseText;var xml=xmlResponse;innerCallback(httpRequest.responseText,xmlResponse,callbackArguments);}}
else{thisAjax.callError(3,"Error connecting; Sever status: "+httpRequest.status+"\n"+httpRequest.responseText,false);}
if(thisAjax.requestWaitList&&thisAjax.requestWaitList.length>0){arg=thisAjax.requestWaitList.shift();thisAjax.request(arg[0],arg[1],arg[2],arg[3],arg[4],arg[5]);}}}
return handleStateChange;}
return true;}
this.getHttpRequest=function(){var httpRequest=undefined;for(i=0;i<this.ajaxRequestArray.length;i++){if(this.ajaxRequestArray[i].readyState==4||this.ajaxRequestArray[i].readyState==0){httpRequest=this.ajaxRequestArray[i];break;}}
if(httpRequest==undefined&&this.ajaxRequestArray.length<this.maxSumiltaniousConnection){try{httpRequest=new XMLHttpRequest();}catch(e){var xmlHttpVersion=new Array("Msxml2.XMLHTTP.6.0","Msxml2.XMLHTTP.5.0","Msxml2.XMLHTTP.4.0","Msxml2.XMLHTTP.3.0","Msxml2.XMLHTTP","Microsoft.XMLHTTP");for(var i=0;i<xmlHttpVersion.length&&!httpRequest;i++){try{httpRequest=new ActiveXObject(xmlHttpVersion[i]);}catch(e){}}}
var nextIndex=this.ajaxRequestArray.length;this.ajaxRequestArray[nextIndex]=httpRequest;}
return httpRequest;}
var outterLoadingFunc='';var outterLoadedFunc='';this.setLoadingFunction=function(callback){outterLoadingFunc=callback;}
this.setLoadedFunction=function(callback){outterLoadedFunc=callback;}
var errorCallback='';var lastError=new Array(0,'');this.setErrorCallback=function(callback){errorCallback=callback;}
this.callError=function(errCode,errMsg,show){lastError=new Array(errCode,errMsg);if(typeof(errorCallback)=="function"){errorCallback(errMsg,errCode);}
else if(show==true){alert(errMsg);}}
this.getLastError=function(){return lastError;}
this.cleanWaitList=function(url){if(url==undefined||url==""){this.requestWaitList=new Array();}
else{function removeFrom(arr,url){var r=new Array;for(var i=0;i<arr.length;i++){if(arr[i][0]!=url){r.push(arr[i]);}}
return r;}
this.requestWaitList=removeFrom(this.requestWaitList,url);}}
this.encoding='iso-8859-1';this.setEncoding=function(newCharset){var old=this.encoding;this.encoding=newCharset;return old;}
this.setAsync=function(newValue){this.async=newValue;}
this.formToUrl=function(formId){return this.formToUrlArguments(formId);}
this.formToUrlArgument=function(formId){return this.formToUrlArguments(formId);}
this.formToUrlArguments=function(formId){var form=false;if(typeof(formId)=="object"){form=formId;}
else{form=document.getElementById(formId);}
if(form!=null&&typeof(form)=="object"&&form.tagName.toLowerCase()=="form"){var r="";for(var i=0;i<form.elements.length;i++){var formElement=form.elements[i];if(formElement.name!=""&&formElement.disabled==false){if(formElement.type=="text"||formElement.type=="hidden"||formElement.type=="password"||formElement.type=="textarea"||formElement.type=="select-one"){r+=encodeURIComponent(formElement.name)+"="+encodeURIComponent(formElement.value)+"&";}
else if(formElement.type=="checkbox"){r+=encodeURIComponent(formElement.name)+"=";if(formElement.checked==true){r+=encodeURIComponent(formElement.value)+"&";}
r+="&"}
else if(formElement.type=="radio"&&formElement.checked){r+=encodeURIComponent(formElement.name)+"=";r+=encodeURIComponent(formElement.value)+"&";}
else if(formElement.type=="select-multiple"){for(var i=0;i<formElement.length;i++){if(formElement.options[i].selected==true){r+=encodeURIComponent(formElement.name)+"[]="+encodeURIComponent(formElement.options[i].value)+"&";}}}
else if(formElement.type=="file"){}}}
return r;}
else{this.callError(4,"The argument passed to formToUrlArguments function is not a form ID or a form object",true);}
return false;}
this.submitFile=function(data,url,iFrameId,iFrameContainerId,display){var iframe;if(iFrameId==undefined)iFrameId='voidFunctionAjaxSubmit';iframe=document.getElementById(iFrameId);if(!iframe){var iFrameContainer;if(iFrameContainerId!=undefined){iFrameContainer=document.getElementById(iFrameContainerId);}
if(!iFrameContainer){iFrameContainer=document.getElementsByTagName('body')[0];}
iframe=document.getElementById('voidFunctionAjaxSubmit');if(!iframe){iframe=document.createElement('iframe');iframe.id='voidFunctionAjaxSubmit';}
iFrameContainer.appendChild(iframe);iframe=document.getElementById(iframe.id);}
if(iframe){if(display!=true){iframe.style.display='none';}
else{iframe.style.display='';}
iframe.name=iframe.id;var form=data.fileElement.form;for(var key in data){if(key!='fileElement'&&typeof(data[key])!='function'){var existing=document.getElementById(key);if(existing){data[key+'_oldValue']=existing.value;existing.value=data[key];if(data[key+'_oldValue']!=data[key]){voidfunction.css_setClass(existing,'voidfunctionAjaxChangedValue');}}
else{var input=document.createElement('input');input.type='hidden';input.name=key;input.id=key;input.className='voidfunctionAjaxToSubmit';input.value=data[key];form.appendChild(input);}}}
oldAction=form.action;oldTarget=form.target;oldEnctype=form.enctype;form.action=url;form.target=iframe.name;form.enctype="multipart/form-data";form.submit();form.action=oldAction;form.target=oldTarget;form.enctype=oldEnctype;data.fileElement.parentNode.innerHTML=data.fileElement.parentNode.innerHTML}}
this.removeIFrame=function(iFrameId){var iFrame=null;if(typeof(iFrameId)=='object'){iFrame=iFrameId;}
else{iFrame=document.getElementById(iFrameId);}
if(iFrame!=null){iFrame.parentNode.removeChild(iFrame);}}
return this;}();voidfunction.getTime=function(){var d=new Date();return d.getTime();}
if(typeof(voidfunction)!='object'){voidfunction={};}
voidfunction.dimension={getScrollOffset:function(){var scrOfX=0,scrOfY=0;if(typeof(window.pageYOffset)=='number'){scrOfY=window.pageYOffset;scrOfX=window.pageXOffset;}else if(document.body&&(document.body.scrollLeft||document.body.scrollTop)){scrOfY=document.body.scrollTop;scrOfX=document.body.scrollLeft;}else if(document.documentElement&&(document.documentElement.scrollLeft||document.documentElement.scrollTop)){scrOfY=document.documentElement.scrollTop;scrOfX=document.documentElement.scrollLeft;}
return{left:scrOfX,top:scrOfY,x:scrOfX,y:scrOfY};},getWindowSize:function(){var myWidth=0,myHeight=0;if(typeof(window.innerWidth)=='number'){myWidth=window.innerWidth;myHeight=window.innerHeight;}else if(document.documentElement&&(document.documentElement.clientWidth||document.documentElement.clientHeight)){myWidth=document.documentElement.clientWidth;myHeight=document.documentElement.clientHeight;}else if(document.body&&(document.body.clientWidth||document.body.clientHeight)){myWidth=document.body.clientWidth;myHeight=document.body.clientHeight;}
return{width:myWidth,height:myHeight};},findPos:function(obj){var curleft=curtop=0;if(typeof(obj)=='string')obj=document.getElementById(obj);if(obj&&obj.offsetParent){do{curleft+=obj.offsetLeft;curtop+=obj.offsetTop;}while(obj=obj.offsetParent);}
return{x:curleft,y:curtop,top:curtop,left:curleft};},findPosAndSize:function(obj){if(typeof(obj)!='object'||obj==null){alert(obj+' should be an object');return{};}
var p=voidfunction.dimension.findPos(obj);p.width=obj.clientWidth;p.height=obj.clientHeight;p.top=p.y;p.right=p.x+p.width;p.bottom=p.y+p.height;p.left=p.x;p.box={'topLeft':{'x':p.x,'y':p.y},'topRight':{'x':p.x+p.width,'y':p.y},'bottomLeft':{'x':p.x,'y':p.y+p.height},'bottomRight':{'x':p.x+p.width,'y':+p.height}};return p;}}
if(typeof(voidfunction)!='object'){voidfunction={};}
voidfunction.slideshow={instance:{},getBasicConfig:function(){return{'duration':5000,'randomizeSlides':false,'useTransition':true,'transitionDuration':150,'slideClassName':'slide','callback':null,'slideTagNames':'div','position':{}};},basicSetup:function(container,options){container.ss_config=voidfunction.slideshow.getBasicConfig();if(options==undefined)options=new Array();for(var i in container.ss_config){if(options[i]!=undefined){container.ss_config[i]=options[i];}}
container.ss_container=new Array();container.ss_navigationContainer=new Array();container.ss_divs=new Array();container.ss_timer=null;},createSlideshowFromCallback:function(el,options){voidfunction.slideshow.basicSetup(this,options);if(typeof(el)=='string')el=document.getElementById(el);if(typeof(el)!='object')return false;el.style.position='relative';this.ss_container.push(el);this.ss_config['position']=voidfunction.dimension.findPos(el);var nav=document.getElementById('slideshow_nav_'+el.id);if(nav)this.ss_navigationContainer.push(nav);voidfunction.slideshow.instance[el.id]=this;voidfunction.slideshow.ss_nextSlide(this);return this;},createSlideshowFromList:function(el,options){voidfunction.slideshow.basicSetup(this,options);if(typeof(el)=='string')el=document.getElementById(el);if(typeof(el)!='object')return false;el.style.position='relative';if(el.tagName.toLowerCase()!='ul'&&el.tagName.toLowerCase()!='ol')return false;this.ss_container.push(el);var nav=document.getElementById('slideshow_nav_'+el.id);if(nav)this.ss_navigationContainer.push(nav);this.ss_config.slideTagNames='li';var lis=el.getElementsByTagName('li');for(var i=0;i<lis.length;i++){li=lis[i];li.className=this.ss_config.slideClassName;li.style.zoom=1;li.opacity=0;li.style.zIndex=10;this.ss_divs.push(li);}
this.ss_config['position']=voidfunction.dimension.findPos(this.ss_divs[0]);for(var i=0;i<this.ss_divs.length;i++){this.ss_divs[i].ss_number=i;}
if(this.ss_navigationContainer.length>0){this.ss_buildNavigation();}
for(var i=0;i<this.ss_container.length;i++){this.ss_container[i].ss_number=i;voidfunction.slideshow.ss_nextSlide(this);}
voidfunction.slideshow.instance[el.id]=this;return this;},getInstance:function(id){return voidfunction.slideshow.instance[id];},ss_pause:function(container,linkElement){clearTimeout(container.ss_timer);if(linkElement!=undefined){linkElement.parentNode.innerHTML='<a href="#" onclick="ss_play(0, this); return false;" style="font-weight: bold;">&gt;</a>';}},ss_play:function(container,linkElement){clearTimeout(container.ss_timer);container.ss_timer=setTimeout(function(){voidfunction.slideshow.ss_nextSlide(container);},container.ss_config.duration);if(linkElement!=undefined){linkElement.parentNode.innerHTML='<a href="#" onclick="ss_pause(0, this); return false;" style="font-weight: bold;">||</a>';}},ss_buildNavigation:function(){},ss_highlightNav:function(container,number){},ss_skipTo:function(container,number){},ss_nextSlide:function(container){clearTimeout(container.ss_timer);var el=container.ss_container[0];if(container.ss_divs.length<=1&&el.ss_started==1&&typeof(container.ss_config.callback)!='function'){return;}
var div=el.getElementsByTagName(container.ss_config.slideTagNames)[0];if(el.ss_started==undefined||el.currentIndex==undefined){el.currentIndex=0;}
else if(container.ss_config.randomizeSlides==1){do{var newIndex=voidfunction.slideshow.ss_getRandomNumber(0,container.ss_divs.length);}while(el.currentIndex==newIndex);el.currentIndex=newIndex;}
else if(el.ss_started==1&&container.ss_config.randomizeSlides!=1){el.currentIndex++;if(el.currentIndex>=container.ss_divs.length&&typeof(container.ss_config.callback)!='function'){el.currentIndex=0;}}
if(el.ss_started==undefined){for(var i=0;i<container.ss_divs.length;i++){container.ss_divs[i].style.position=el.style.position;container.ss_divs[i].style.top=el.style.top;container.ss_divs[i].style.left=el.style.left;container.ss_divs[i].style.zIndex=el.style.zIndex;}
voidfunction.slideshow.ss_highlightNav(container,el.currentIndex);}
if(el.ss_started==1&&container.ss_config.useTransition!=false){var nextDiv;if(container.ss_divs[el.currentIndex]!=undefined){nextDiv=container.ss_divs[el.currentIndex];}
else if(typeof(container.ss_config.callback)=='function'){nextDiv=container.ss_config.callback(container);if(nextDiv==null)return;}
voidfunction.slideshow.ss_transition(container,div,nextDiv,container.ss_config.transitionDuration,0);}
else{while(el.childNodes.length){el.removeChild(el.firstChild);}
if(container.ss_divs[el.currentIndex]!=undefined){nextDiv=container.ss_divs[el.currentIndex];}
else if(typeof(container.ss_config.callback)=='function'){nextDiv=container.ss_config.callback(container);if(nextDiv==null)return false;}
el.appendChild(nextDiv);voidfunction.toggleOn(container.ss_divs[el.currentIndex]);voidfunction.slideshow.ss_highlightNav(container,nextDiv.ss_number);voidfunction.addEvent(nextDiv,'mouseover',function(){voidfunction.slideshow.ss_pause(container);});voidfunction.addEvent(nextDiv,'mouseout',function(){voidfunction.slideshow.ss_play(container);});if(container.ss_divs.length>1||typeof(container.ss_config.callback)=='function'){container.ss_timer=setTimeout(function(){voidfunction.slideshow.ss_nextSlide(container);},container.ss_config.duration);}}
voidfunction.toggleOn(el);el.ss_started=1;},ss_transition:function(container,el,nextEl,duration,skipped){if(nextEl==undefined)return;el.style.display="";nextEl.style.display="none";if(nextEl.id==undefined||nextEl.id==''){var tempId;do{tempId='next_'+voidfunction.slideshow.ss_getRandomNumber(0,1000);}while(document.getElementById(tempId)!=undefined);nextEl.id=tempId;}
el.tempId=nextEl.id;el.parentNode.appendChild(nextEl);el.opacity=100;nextEl.opacity=100;if(typeof(el.style.opacity)=="string"){el.style.opacity=el.opacity/100;nextEl.style.opacity=nextEl.opacity;}
else{el.style.filter="alpha(opacity="+el.opacity+")";nextEl.style.filter="alpha(opacity="+nextEl.opacity+")";}
el.style.zIndex=2;el.style.position='absolute';nextEl.style.position='';voidfunction.toggleOn(nextEl);nextEl.style.zIndex=1;nextEl.style.top=container.ss_config.position.top+'px';nextEl.style.left=container.ss_config.position.left+'px';var step=100/duration*10;el.tansitionInterval=setInterval(function(){voidfunction.slideshow.ss_transition_mid(container,el,nextEl,step,skipped);},10);},ss_transition_mid:function(container,el,nextEl,step,skipped){el.opacity-=step;if(el.opacity<=0){el.opacity=0;voidfunction.toggleOn(nextEl);nextEl.opacity+=step;if(nextEl.opacity>=100){nextEl.opacity=100;}}
if(typeof(el.style.opacity)=="string"){el.style.opacity=el.opacity/100;nextEl.style.opacity=nextEl.opacity/100;}
else{el.style.filter="alpha(opacity="+el.opacity+")";nextEl.style.filter="alpha(opacity="+nextEl.opacity+")";}
if(el.opacity==0){el.style.display="none";nextEl.style.display="";voidfunction.slideshow.ss_highlightNav(container,nextEl.ss_number);}
if(el.opacity==0&&nextEl.opacity==100){clearInterval(el.tansitionInterval);voidfunction.slideshow.ss_transition_end(container,el,skipped)}},ss_transition_end:function(container,el,skipped){var newEl=document.getElementById(el.tempId);newEl.opacity=100;if(typeof(newEl.style.opacity)=="string"){newEl.style.opacity=newEl.opacity/100;}
else{newEl.style.filter="alpha(opacity="+newEl.opacity+")";}
newEl.style.position='';voidfunction.removeEvent(el,'mouseover',function(){voidfunction.slideshow.ss_pause(container);});voidfunction.removeEvent(el,'mouseout',function(){voidfunction.slideshow.ss_play(container);});voidfunction.addEvent(newEl,'mouseover',function(){voidfunction.slideshow.ss_pause(container);});voidfunction.addEvent(newEl,'mouseout',function(){voidfunction.slideshow.ss_play(container);});if(el.parentNode){voidfunction.toggleOff(el);el.parentNode.removeChild(el);}
clearTimeout(container.ss_timer);if(container.ss_divs.length>1){container.ss_timer=setTimeout(function(){voidfunction.slideshow.ss_nextSlide(container);},container.ss_config.duration*(skipped?3:1));}},ss_getRandomNumber:function(start,end){if(end==undefined)end=0;if(start>end){var tmp=start;start=end;end=tmp;}
var range=end-start;var returnValue=1;if(range>1){returnValue=Math.floor(Math.random()*range);}
return returnValue;},ss_findPos:function(obj){var curleft=curtop=0;if(obj.offsetParent){do{curleft+=obj.offsetLeft;curtop+=obj.offsetTop;}while(obj=obj.offsetParent);}
return{x:curleft,y:curtop};}}
var start_homeImageSlider_speed=10;var start_homeImageSlider_position=new Array();var start_homeImageSlider_pause=new Array();var start_homeImageSlider_speedAdd=new Array();var start_homeImageSlider_direction=new Array();function start_homeImageSlider(myId){start_homeImageSlider_position[myId]=document.getElementById(myId).offsetLeft;setTimeout('start_homeImageSlider_move(\''+myId+'\')',start_homeImageSlider_speed);}
function start_homeImageSlider_move(myId){myId=document.getElementById(myId);if(start_homeImageSlider_pause[myId.id]==0){if(start_homeImageSlider_direction[myId.id]==1)start_homeImageSlider_position[myId.id]=start_homeImageSlider_position[myId.id]-start_homeImageSlider_speedAdd[myId.id];else start_homeImageSlider_position[myId.id]=start_homeImageSlider_position[myId.id]+start_homeImageSlider_speedAdd[myId.id];myId.style.marginLeft=parseInt(0-start_homeImageSlider_position[myId.id])+'px';}
if(start_homeImageSlider_direction[myId.id]==1&&start_homeImageSlider_position[myId.id]<=0){start_homeImageSlider_pause[myId.id]=1;start_homeImageSlider_direction[myId.id]=0;setTimeout('start_homeImageSlider_unPause(\''+myId.id+'\')',5000);}
else if(start_homeImageSlider_position[myId.id]>document.getElementById(myId.id).offsetWidth-740){start_homeImageSlider_pause[myId.id]=1;start_homeImageSlider_direction[myId.id]=1;setTimeout('start_homeImageSlider_unPause(\''+myId.id+'\')',5000);}
setTimeout('start_homeImageSlider_move(\''+myId.id+'\')',start_homeImageSlider_speed);}
function start_homeImageSlider_unPause(myId){start_homeImageSlider_pause[myId.id]=0;}
var start_divflipper_delay=3000;var start_divflipper_speed=10;var start_divflipper_original='';var start_divflipper_pause=new Array();var start_divflipper_nth=new Array();var start_divflipper_nthFound=new Array();var start_divflipper_opacity=new Array();function start_divflipper(myId){if(document.getElementById(myId))setTimeout('start_divflipper_flip(\''+myId+'\')',start_divflipper_delay);}
function start_divflipper_flip(myId){myId=document.getElementById(myId);var thisId=start_divflipper_original.replace(/_0/,'_'+start_divflipper_nth[start_divflipper_original]);if(parseInt(start_divflipper_nth[start_divflipper_original])>=parseInt(start_divflipper_nthFound[start_divflipper_original])){thisId=start_divflipper_original;start_divflipper_nth[start_divflipper_original]=0;}
var nextId=start_divflipper_original.replace(/_0/,'_'+parseInt(start_divflipper_nth[start_divflipper_original]+1));if(parseInt(start_divflipper_nth[start_divflipper_original]+1)>=parseInt(start_divflipper_nthFound[start_divflipper_original]))nextId=start_divflipper_original;document.getElementById(nextId).style.zIndex=53;setTimeout('start_divflipper_dissolve(\''+thisId+'\')',start_divflipper_speed);}
function start_divflipper_dissolve(myId){myId=document.getElementById(myId);if(start_divflipper_pause[start_divflipper_original]==0){start_divflipper_opacity[start_divflipper_original]=start_divflipper_opacity[start_divflipper_original]-2;document.getElementById(myId.id).style.opacity=start_divflipper_opacity[start_divflipper_original]/100;if(MYBROWSER=="MSIE")document.getElementById(myId.id).style.filter='alpha(opacity='+start_divflipper_opacity[start_divflipper_original]+')';}
if(start_divflipper_opacity[start_divflipper_original]>0)setTimeout('start_divflipper_dissolve(\''+myId.id+'\')',start_divflipper_speed);else{var thisId=myId.id;var nextId=start_divflipper_original.replace(/_0/,'_'+parseInt(start_divflipper_nth[start_divflipper_original]+1));if(parseInt(start_divflipper_nth[start_divflipper_original]+1)>=parseInt(start_divflipper_nthFound[start_divflipper_original]))nextId=start_divflipper_original;document.getElementById(nextId).style.zIndex=55;document.getElementById(thisId).style.zIndex=50;document.getElementById(thisId).style.opacity=1;if(MYBROWSER=="MSIE")document.getElementById(thisId).style.filter='alpha(opacity=100)';start_divflipper_nth[start_divflipper_original]=start_divflipper_nth[start_divflipper_original]+1;start_divflipper_opacity[start_divflipper_original]=100;setTimeout('start_divflipper_flip(\''+myId.id+'\')',start_divflipper_delay);}}
function setPorteFolioScore(myScore,memberId,whichJury){document.getElementById('checkButtonContainerTD_'+memberId).innerHTML='';showAndHide('dateLastCheckContainerTD_'+memberId+',dateLastCheckContainerDIV_'+memberId,'hide,show');ajax.replace('index.php','ajaxActions_div','POST','ajaxAction=client_file/ajax_actions.php&action=changePorteFolioScoreByAdmin&memberId='+memberId+'&score='+myScore+'&jury='+whichJury);}
function writePrivateMessageToMember(memberId,replyToId){openModalWindow_sk('','',520,380,0,0,'#ffffff');ajax.request('index.php',writePrivateMessageToMember_callBack,'POST','ajaxAction=modules/members/ajax_actions.php&action=writePrivateMessageToMember&member_recipient='+memberId+'&replyToId='+replyToId);}
function writePrivateMessageToMember_callBack(json){json=eval('['+json+']')[0];document.getElementById('modalWindowContentWrapper_'+numberModalWindowOpen).innerHTML=json['string'];if(document.getElementById(json['focus'])){var textarea=document.getElementById(json['focus']);setTimeout(function(){textarea.focus();},1000);if(json['focusPosition']){if(document.selection){var ieSelection=document.selection.createRange();ieSelection.moveStart('textedit start');}
else{textarea.selectionStart=json['focusPosition']['start'];textarea.selectionEnd=json['focusPosition']['end'];}}}}
function sendPrivateMessage(formId){showAndHide('sendlink_td1,sendlink_td2','hide,show');ajax.request('index.php',sendPrivateMessage_validated,'POST',ajax.formToUrlArguments(formId));}
function sendPrivateMessage_validated(text){if(text=='MESSAGE_SENT_OKAY')closeModalWindow_sk(true);else{showAndHide('sendlink_td1,sendlink_td2','show,hide');alert(text);}}
function automaticGetUsernameInInputField(myThis){ajax.request('index.php',automaticGetUsernameInInputField2,'POST','ajaxAction=modules/members/ajax_actions.php&action=getUsernameAutoInput&actual_value='+myThis.value);}
function automaticGetUsernameInInputField2(text){if(text!=''){var allNameFound=text.split(",");var newContent='';for(var i=0;i<=allNameFound.length;i++){if(allNameFound[i])newContent=newContent+'<div id="" style="cursor: pointer;" onmouseover="automaticGetUsernameInInputField_mouseOver(this);" onmouseout="automaticGetUsernameInInputField_mouseOut(this)" onclick="select_automaticGetUsernameInInputField(this);">'+allNameFound[i]+'</div>';}
showAndHide('automaticGetUsernameInInputField_div','show');document.getElementById('automaticGetUsernameInInputField_div').innerHTML=newContent;}
else showAndHide('automaticGetUsernameInInputField_div','hide');}
function select_automaticGetUsernameInInputField(myThis){showAndHide('automaticGetUsernameInInputField_div','hide');document.getElementById('to_input').value=myThis.innerHTML;}
function automaticGetUsernameInInputField_mouseOver(myThis){myThis.style.background='silver';}
function automaticGetUsernameInInputField_mouseOut(myThis){myThis.style.background='white';}
function show_private_message(msgId,myTable){openModalWindow_sk('','',520,380,0,0,'#ffffff');ajax.replace('index.php','modalWindowContentWrapper_'+numberModalWindowOpen,'POST','ajaxAction=modules/members/ajax_actions.php&action=show_private_message&msgId='+msgId+'&myTable='+myTable);}
function private_message_changeBodyMessageNumbers(){if(document.getElementById('numPMBodyPage_span')){ajax.request('index.php',handle_numMessagesInbox,'POST','ajaxAction=modules/members/ajax_actions.php&action=getNumberOfNewMessage');}}
function handle_numMessagesInbox(text){document.getElementById('numPMBodyPage_span').innerHTML=text;if(text>1){if(document.getElementById('numPMBodyPage_X_span'))document.getElementById('numPMBodyPage_X_span').innerHTML='x';if(document.getElementById('numPMBodyPage_S_span'))document.getElementById('numPMBodyPage_S_span').innerHTML='s';}
else{if(document.getElementById('numPMBodyPage_X_span'))document.getElementById('numPMBodyPage_X_span').innerHTML='';if(document.getElementById('numPMBodyPage_S_span'))document.getElementById('numPMBodyPage_S_span').innerHTML='';}}
function checkAllInTable(myTable,doWhat){var children=document.getElementById(myTable).getElementsByTagName('*');var myIdList='';for(var i=0;i<children.length;i++){if(children[i].getAttribute("type")!=null&&children[i].getAttribute("type")=='checkbox')children[i].checked=doWhat;}}
function getAllElementsInTable(myTable){var children=document.getElementById(myTable).getElementsByTagName('*');var myIdList='';for(var i=0;i<children.length;i++){if(children[i].getAttribute("type")!=null&&children[i].getAttribute("type")=='checkbox'&&children[i].checked)myIdList=myIdList+','+children[i].value;}
return myIdList;}
function private_message_manipulateMessages(myTable,myAction,myId){if(myId)var myIds=myId;else var myIds=getAllElementsInTable(myTable);var allIdsExplode=myIds.split(",");var myAjaxAction='';var msgIds='';for(var i=0;i<allIdsExplode.length;i++){if(allIdsExplode[i]&&allIdsExplode[i]>0){msgIds=msgIds+','+allIdsExplode[i];var row=document.getElementById('lineInbox_'+myTable+allIdsExplode[i]);if(myAction=='markAsRead'){myAjaxAction='privateMessageMarkAsRead';document.getElementById('not_read_td_'+allIdsExplode[i]).className='sujet-lu-messagerieint';}
else if(myAction=='markAsNotRead'){myAjaxAction='privateMessageMarkAsNotRead';document.getElementById('not_read_td_'+allIdsExplode[i]).className='sujet-nonlu-messagerieint';}
else if(myAction=='sendToArchive'){myAjaxAction='sendPrivateMessageToArchive';document.getElementById('archiveTableWrapper').appendChild(row);if(document.getElementById('inboxTableWrapper_span'))document.getElementById('inboxTableWrapper_span').innerHTML=parseInt(document.getElementById('inboxTableWrapper_span').innerHTML)-1;if(document.getElementById('archiveTableWrapper_span'))document.getElementById('archiveTableWrapper_span').innerHTML=parseInt(document.getElementById('archiveTableWrapper_span').innerHTML)+1;document.getElementById('lineInbox_'+myTable+allIdsExplode[i]).id='lineInbox_archiveTableWrapper'+allIdsExplode[i];}
else if(myAction=='sendToInbox'){myAjaxAction='sendPrivateMessageToInbox';document.getElementById('inboxTableWrapper').appendChild(row);if(document.getElementById('inboxTableWrapper_span'))document.getElementById('inboxTableWrapper_span').innerHTML=parseInt(document.getElementById('inboxTableWrapper_span').innerHTML)+1;if(document.getElementById('archiveTableWrapper_span'))document.getElementById('archiveTableWrapper_span').innerHTML=parseInt(document.getElementById('archiveTableWrapper_span').innerHTML)-1;document.getElementById('lineInbox_'+myTable+allIdsExplode[i]).id='lineInbox_inboxTableWrapper'+allIdsExplode[i];}
else if(myAction=='delete'){myAjaxAction='deletePrivateMessage';if(document.getElementById(myTable+'_span'))document.getElementById(myTable+'_span').innerHTML=parseInt(document.getElementById(myTable+'_span').innerHTML)-1;if(row)row.parentNode.removeChild(row);}
else if(myAction=='delete_sent'){myAjaxAction='deletePrivateMessage_sentBox';if(row)row.parentNode.removeChild(row);}}}
msgIds=msgIds.substring(1);if(myAjaxAction!=''&&msgIds!=''){ajax.replace('index.php','ajaxActions_div','POST','ajaxAction=modules/members/ajax_actions.php&action='+myAjaxAction+'&msgIds='+msgIds,doNothing,private_message_changeBodyMessageNumbers);}}
function private_message_switchShowBox(whichBox){showAndHide('inboxTableWrapper_div,archiveTableWrapper_div,sentTableWrapper_div','hide,hide,hide');showAndHide(whichBox+'_div','show');document.getElementById('inboxTableWrapper_alink').className='';document.getElementById('archiveTableWrapper_alink').className='';document.getElementById('sentTableWrapper_alink').className='';document.getElementById(whichBox+'_alink').className='on';}
function deleteMyAccount_member(){openModalWindow_sk();ajax.replace('index.php','modalWindowContentWrapper_'+numberModalWindowOpen,'POST','ajaxAction=client_file/ajax_actions.php&action=delete_my_member_account');}
var bannersIdImpressionLoaded='';var timeBannerStarted=false;var timeBannerDisplayed=0;function bannersLoaded(bannerId){if(!timeBannerStarted){timeBannerStarted=true;setTimeout("bannersCounter()","1000");}
if(bannersIdImpressionLoaded=='')bannersIdImpressionLoaded=bannerId;else bannersIdImpressionLoaded=bannersIdImpressionLoaded+','+bannerId;}
function bannersCounter(){timeBannerDisplayed=timeBannerDisplayed+1;setTimeout("bannersCounter()","1000");}
function bannersLoaded_unloading(){ajax.request('index.php','modalWindowContentWrapper_'+numberModalWindowOpen,'POST','ajaxAction=modules/banners/ajax_actions.php&action=recordTimeBannerDisplay&bannersIds='+bannersIdImpressionLoaded+'&timeElapsed='+timeBannerDisplayed);}
(function(d){d.fn.anythingSliderVideo=function(b){var c={videoID:"asvideo"};return this.each(function(){var a,e,h,g,f=d(this).data("AnythingSlider");if(f){a=f.video={};a.options=d.extend({},c,b);a.hasSwfo=typeof swfobject!=="undefined"&&swfobject.hasOwnProperty("embedSWF")&&typeof swfobject.embedSWF==="function"?!0:!1;a.list={};a.hasVid=!1;a.hasEmbed=!1;a.services=d.fn.anythingSliderVideo.services;a.len=0;a.hasEmbedCount=0;a.hasiframeCount=0;a.$items=f.$items.filter(":not(.cloned)");for(h in a.services)if(typeof h==="string")g=a.services[h].selector,a.$items.find(g).each(function(){e=d(this);e.attr("id",a.options.videoID+a.len);a.list[a.len]={id:a.options.videoID+a.len++,panel:e.closest(".panel")[0],service:h,selector:g,status:-1};a.hasVid=!0;g.match("embed|object")?(a.hasEmbed=!0,a.hasEmbedCount++):g.match("iframe")&&a.hasiframeCount++});d.each(a.list,function(b,c){var l,e,i,g,h=d(c.panel).find(c.selector),j=a.services[c.service],k=j.initAPI||"";a.hasEmbed&&a.hasSwfo&&c.selector.match("embed|object")?h.each(function(){e=d(this).parent()[0].tagName==="OBJECT"?d(this).parent():d(this);i=e[0].tagName==="EMBED"?e.attr("src"):e.find("embed").attr("src")||e.children().filter("[name=movie]").attr("value");g=d.extend(!0,{},{flashvars:null,params:{allowScriptAccess:"always",wmode:f.options.addWmodeToObject,allowfullscreen:!0},attr:{"class":e.attr("class"),style:e.attr("style"),"data-url":i}},j.embedOpts);e.wrap('<div id="'+c.id+'"></div>');swfobject.embedSWF(i+(k===""?"":k+c.id),c.id,e.attr("width"),e.attr("height"),"10",null,g.flashvars,g.params,g.attr,function(){if(j.hasOwnProperty("init"))a.list[b].player=j.init(f,c.id,b);b>=a.hasEmbedCount&&f.$el.trigger("swf_completed",f)})}):c.selector.match("iframe")&&h.each(function(){i=d(this).attr("src");l=(i.match(/\?/g)?"":"?")+"&wmode="+f.options.addWmodeToObject;d(this).attr("src",function(a,b){return b+l+(k===""?"":k+c.id)})})});a.gup=function(a,b){var a=a.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]"),c=RegExp("[\\?&]"+a+"=([^&#]*)").exec(b||window.location.href);return c===null?"":c[1]};a.postMsg=function(a,b){var c=d("#"+b);c.length&&c[0].contentWindow.postMessage(a,c.attr("src").split("?")[0])};a.message=function(b){if(b.data&&!/infoDelivery/g.test(b.data)){var c=d.parseJSON(b.data);d.each(a.list,function(b){a.services[a.list[b].service].hasOwnProperty("message")&&a.services[a.list[b].service].message(f,c)})}};a.control=function(b){var c,d=a.list,e=b==="pause"?f.$lastPage[0]:f.$currentPage[0],g=!1;for(c=0;c<a.len;c++)d[c].panel===e&&a.services[d[c].service].hasOwnProperty(b)&&(g=a.services[d[c].service][b](f,d[c].id,c));return g};a.hasiframeCount&&(window.addEventListener?window.addEventListener("message",a.message,!1):window.attachEvent("onmessage",a.message,!1));f.$el.bind("slide_init",function(){a.control("pause")}).bind("slide_complete",function(){a.control("cont")});f.options.isVideoPlaying=function(){return a.control("isPlaying")}}})};d.fn.anythingSliderVideo.services={video:{selector:"video",cont:function(b,c){var a=d("#"+c);a.length&&a[0].paused&&a[0].currentTime>0&&!a[0].ended&&a[0].play()},pause:function(){d("video").each(function(){typeof this.pause!=="undefined"&&this.pause()})},isPlaying:function(b,c){var a=d("#"+c);return a.length&&typeof a[0].pause!=="undefined"&&!a[0].paused&&!a[0].ended?!0:!1}},vimeo1:{selector:"iframe[src*=vimeo]",initAPI:"&api=1&player_id=",cont:function(b,c,a){b.video.list[a].status==="pause"&&b.video.postMsg('{"method":"play"}',c)},pause:function(b){d("iframe[src*=vimeo]").each(function(){b.video.postMsg('{"method":"pause"}',this.id)})},message:function(b,c){var a,d=c.player_id||"";if(d!==""&&(a=d.replace(b.video.options.videoID,""),c.event==="ready"&&(b.video.postMsg('{"method":"addEventListener","value":"play"}',d),b.video.postMsg('{"method":"addEventListener","value":"pause"}',d),b.video.postMsg('{"method":"addEventListener","value":"finish"}',d)),b.video.list[a]))b.video.list[a].status=c.event},isPlaying:function(b,c,a){return b.video.list[a].status==="play"?!0:!1}},vimeo2:{selector:"object[data-url*=vimeo], embed[src*=vimeo]",embedOpts:{flashvars:{api:1}},cont:function(b,c){var a=d("#"+c);typeof a[0].api_play==="function"&&a[0].api_paused()&&a[0].api_getCurrentTime()!==0&&a[0].api_getDuration()-a[0].api_getCurrentTime()>2&&a[0].api_play()},pause:function(){d("object[data-url*=vimeo], embed[src*=vimeo]").each(function(){var b=this.tagName==="EMBED"?d(this).parent()[0]:this;typeof b.api_pause==="function"&&b.api_pause()})},isPlaying:function(b,c){var a=d("#"+c);return typeof a[0].api_paused==="function"&&!a[0].api_paused()?!0:!1}},youtube1:{selector:"iframe[src*=youtube]",initAPI:"&iv_load_policy=3&enablejsapi=1&playerapiid=",cont:function(b,c,a){b.video.list[a].status===2&&b.video.postMsg('{"event":"command","func":"playVideo"}',c)},pause:function(b,c){d("iframe[src*=youtube]").each(function(){b.video.postMsg('{"event":"command","func":"pauseVideo"}',c)})},message:function(b,c){if(c.event!=="infoDelivery"&&c.info&&c.info.videoUrl){var a=b.video.gup("v",c.info.videoUrl),a=d("iframe[src*="+a+"]")[0].id,e=a.replace(b.video.options.videoID,"");c.event==="onReady"&&b.video.postMsg('{"event":"listening","func":"onStateChange"}',a);if(c.event==="onStateChange"&&b.video.list[e])b.video.list[e].status=c.state}},isPlaying:function(b,c,a){b=b.video.list[a].status;return b===1||b>2?!0:!1}},youtube2:{selector:"object[data-url*=youtube], embed[src*=youtube]",initAPI:"&iv_load_policy=3&enablejsapi=1&version=3&playerapiid=",cont:function(b,c){var a=d("#"+c);a.length&&typeof a[0].getPlayerState==="function"&&a[0].getPlayerState()>0&&a[0].playVideo()},pause:function(){d("object[data-url*=youtube], embed[src*=youtube]").each(function(){var b=this.tagName==="EMBED"?d(this).parent()[0]:this;typeof b.getPlayerState==="function"&&b.getPlayerState()>0&&b.pauseVideo()})},isPlaying:function(b,c){var a=d("#"+c);return typeof a[0].getPlayerState==="function"&&(a[0].getPlayerState()===1||a[0].getPlayerState()>2)?!0:!1}}}})(jQuery);jQuery(window).load(function(){jQuery(".anythingBase").anythingSliderVideo()});jQuery.extend(jQuery.easing,{easeInQuad:function(x,t,b,c,d){return c*(t/=d)*t+b;},easeOutQuad:function(x,t,b,c,d){return-c*(t/=d)*(t-2)+b;},easeInOutQuad:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t+b;return-c/2*((--t)*(t-2)-1)+b;},easeInCubic:function(x,t,b,c,d){return c*(t/=d)*t*t+b;},easeOutCubic:function(x,t,b,c,d){return c*((t=t/d-1)*t*t+1)+b;},easeInOutCubic:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t*t+b;return c/2*((t-=2)*t*t+2)+b;},easeInQuart:function(x,t,b,c,d){return c*(t/=d)*t*t*t+b;},easeOutQuart:function(x,t,b,c,d){return-c*((t=t/d-1)*t*t*t-1)+b;},easeInOutQuart:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t*t*t+b;return-c/2*((t-=2)*t*t*t-2)+b;},easeInQuint:function(x,t,b,c,d){return c*(t/=d)*t*t*t*t+b;},easeOutQuint:function(x,t,b,c,d){return c*((t=t/d-1)*t*t*t*t+1)+b;},easeInOutQuint:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t*t*t*t+b;return c/2*((t-=2)*t*t*t*t+2)+b;},easeInSine:function(x,t,b,c,d){return-c*Math.cos(t/d*(Math.PI/2))+c+b;},easeOutSine:function(x,t,b,c,d){return c*Math.sin(t/d*(Math.PI/2))+b;},easeInOutSine:function(x,t,b,c,d){return-c/2*(Math.cos(Math.PI*t/d)-1)+b;},easeInExpo:function(x,t,b,c,d){return(t==0)?b:c*Math.pow(2,10*(t/d-1))+b;},easeOutExpo:function(x,t,b,c,d){return(t==d)?b+c:c*(-Math.pow(2,-10*t/d)+1)+b;},easeInOutExpo:function(x,t,b,c,d){if(t==0)return b;if(t==d)return b+c;if((t/=d/2)<1)return c/2*Math.pow(2,10*(t-1))+b;return c/2*(-Math.pow(2,-10*--t)+2)+b;},easeInCirc:function(x,t,b,c,d){return-c*(Math.sqrt(1-(t/=d)*t)-1)+b;},easeOutCirc:function(x,t,b,c,d){return c*Math.sqrt(1-(t=t/d-1)*t)+b;},easeInOutCirc:function(x,t,b,c,d){if((t/=d/2)<1)return-c/2*(Math.sqrt(1-t*t)-1)+b;return c/2*(Math.sqrt(1-(t-=2)*t)+1)+b;},easeInElastic:function(x,t,b,c,d){var s=1.70158;var p=0;var a=c;if(t==0)return b;if((t/=d)==1)return b+c;if(!p)p=d*.3;if(a<Math.abs(c)){a=c;var s=p/4;}
else var s=p/(2*Math.PI)*Math.asin(c/a);return-(a*Math.pow(2,10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p))+b;},easeOutElastic:function(x,t,b,c,d){var s=1.70158;var p=0;var a=c;if(t==0)return b;if((t/=d)==1)return b+c;if(!p)p=d*.3;if(a<Math.abs(c)){a=c;var s=p/4;}
else var s=p/(2*Math.PI)*Math.asin(c/a);return a*Math.pow(2,-10*t)*Math.sin((t*d-s)*(2*Math.PI)/p)+c+b;},easeInOutElastic:function(x,t,b,c,d){var s=1.70158;var p=0;var a=c;if(t==0)return b;if((t/=d/2)==2)return b+c;if(!p)p=d*(.3*1.5);if(a<Math.abs(c)){a=c;var s=p/4;}
else var s=p/(2*Math.PI)*Math.asin(c/a);if(t<1)return-.5*(a*Math.pow(2,10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p))+b;return a*Math.pow(2,-10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p)*.5+c+b;},easeInBack:function(x,t,b,c,d,s){if(s==undefined)s=1.70158;return c*(t/=d)*t*((s+1)*t-s)+b;},easeOutBack:function(x,t,b,c,d,s){if(s==undefined)s=1.70158;return c*((t=t/d-1)*t*((s+1)*t+s)+1)+b;},easeInOutBack:function(x,t,b,c,d,s){if(s==undefined)s=1.70158;if((t/=d/2)<1)return c/2*(t*t*(((s*=(1.525))+1)*t-s))+b;return c/2*((t-=2)*t*(((s*=(1.525))+1)*t+s)+2)+b;},easeInBounce:function(x,t,b,c,d){return c-jQuery.easing.easeOutBounce(x,d-t,0,c,d)+b;},easeOutBounce:function(x,t,b,c,d){if((t/=d)<(1/2.75)){return c*(7.5625*t*t)+b;}else if(t<(2/2.75)){return c*(7.5625*(t-=(1.5/2.75))*t+.75)+b;}else if(t<(2.5/2.75)){return c*(7.5625*(t-=(2.25/2.75))*t+.9375)+b;}else{return c*(7.5625*(t-=(2.625/2.75))*t+.984375)+b;}},easeInOutBounce:function(x,t,b,c,d){if(t<d/2)return jQuery.easing.easeInBounce(x,t*2,0,c,d)*.5+b;return jQuery.easing.easeOutBounce(x,t*2-d,0,c,d)*.5+c*.5+b;}});var swfobject=function(){var D="undefined",r="object",S="Shockwave Flash",W="ShockwaveFlash.ShockwaveFlash",q="application/x-shockwave-flash",R="SWFObjectExprInst",x="onreadystatechange",O=window,j=document,t=navigator,T=false,U=[h],o=[],N=[],I=[],l,Q,E,B,J=false,a=false,n,G,m=true,M=function(){var aa=typeof j.getElementById!=D&&typeof j.getElementsByTagName!=D&&typeof j.createElement!=D,ah=t.userAgent.toLowerCase(),Y=t.platform.toLowerCase(),ae=Y?/win/.test(Y):/win/.test(ah),ac=Y?/mac/.test(Y):/mac/.test(ah),af=/webkit/.test(ah)?parseFloat(ah.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,X=!+"\v1",ag=[0,0,0],ab=null;if(typeof t.plugins!=D&&typeof t.plugins[S]==r){ab=t.plugins[S].description;if(ab&&!(typeof t.mimeTypes!=D&&t.mimeTypes[q]&&!t.mimeTypes[q].enabledPlugin)){T=true;X=false;ab=ab.replace(/^.*\s+(\S+\s+\S+$)/,"$1");ag[0]=parseInt(ab.replace(/^(.*)\..*$/,"$1"),10);ag[1]=parseInt(ab.replace(/^.*\.(.*)\s.*$/,"$1"),10);ag[2]=/[a-zA-Z]/.test(ab)?parseInt(ab.replace(/^.*[a-zA-Z]+(.*)$/,"$1"),10):0}}else{if(typeof O.ActiveXObject!=D){try{var ad=new ActiveXObject(W);if(ad){ab=ad.GetVariable("$version");if(ab){X=true;ab=ab.split(" ")[1].split(",");ag=[parseInt(ab[0],10),parseInt(ab[1],10),parseInt(ab[2],10)]}}}catch(Z){}}}return{w3:aa,pv:ag,wk:af,ie:X,win:ae,mac:ac}}(),k=function(){if(!M.w3){return}if((typeof j.readyState!=D&&j.readyState=="complete")||(typeof j.readyState==D&&(j.getElementsByTagName("body")[0]||j.body))){f()}if(!J){if(typeof j.addEventListener!=D){j.addEventListener("DOMContentLoaded",f,false)}if(M.ie&&M.win){j.attachEvent(x,function(){if(j.readyState=="complete"){j.detachEvent(x,arguments.callee);f()}});if(O==top){(function(){if(J){return}try{j.documentElement.doScroll("left")}catch(X){setTimeout(arguments.callee,0);return}f()})()}}if(M.wk){(function(){if(J){return}if(!/loaded|complete/.test(j.readyState)){setTimeout(arguments.callee,0);return}f()})()}s(f)}}();function f(){if(J){return}try{var Z=j.getElementsByTagName("body")[0].appendChild(C("span"));Z.parentNode.removeChild(Z)}catch(aa){return}J=true;var X=U.length;for(var Y=0;Y<X;Y++){U[Y]()}}function K(X){if(J){X()}else{U[U.length]=X}}function s(Y){if(typeof O.addEventListener!=D){O.addEventListener("load",Y,false)}else{if(typeof j.addEventListener!=D){j.addEventListener("load",Y,false)}else{if(typeof O.attachEvent!=D){i(O,"onload",Y)}else{if(typeof O.onload=="function"){var X=O.onload;O.onload=function(){X();Y()}}else{O.onload=Y}}}}}function h(){if(T){V()}else{H()}}function V(){var X=j.getElementsByTagName("body")[0];var aa=C(r);aa.setAttribute("type",q);var Z=X.appendChild(aa);if(Z){var Y=0;(function(){if(typeof Z.GetVariable!=D){var ab=Z.GetVariable("$version");if(ab){ab=ab.split(" ")[1].split(",");M.pv=[parseInt(ab[0],10),parseInt(ab[1],10),parseInt(ab[2],10)]}}else{if(Y<10){Y++;setTimeout(arguments.callee,10);return}}X.removeChild(aa);Z=null;H()})()}else{H()}}function H(){var ag=o.length;if(ag>0){for(var af=0;af<ag;af++){var Y=o[af].id;var ab=o[af].callbackFn;var aa={success:false,id:Y};if(M.pv[0]>0){var ae=c(Y);if(ae){if(F(o[af].swfVersion)&&!(M.wk&&M.wk<312)){w(Y,true);if(ab){aa.success=true;aa.ref=z(Y);ab(aa)}}else{if(o[af].expressInstall&&A()){var ai={};ai.data=o[af].expressInstall;ai.width=ae.getAttribute("width")||"0";ai.height=ae.getAttribute("height")||"0";if(ae.getAttribute("class")){ai.styleclass=ae.getAttribute("class")}if(ae.getAttribute("align")){ai.align=ae.getAttribute("align")}var ah={};var X=ae.getElementsByTagName("param");var ac=X.length;for(var ad=0;ad<ac;ad++){if(X[ad].getAttribute("name").toLowerCase()!="movie"){ah[X[ad].getAttribute("name")]=X[ad].getAttribute("value")}}P(ai,ah,Y,ab)}else{p(ae);if(ab){ab(aa)}}}}}else{w(Y,true);if(ab){var Z=z(Y);if(Z&&typeof Z.SetVariable!=D){aa.success=true;aa.ref=Z}ab(aa)}}}}}function z(aa){var X=null;var Y=c(aa);if(Y&&Y.nodeName=="OBJECT"){if(typeof Y.SetVariable!=D){X=Y}else{var Z=Y.getElementsByTagName(r)[0];if(Z){X=Z}}}return X}function A(){return!a&&F("6.0.65")&&(M.win||M.mac)&&!(M.wk&&M.wk<312)}function P(aa,ab,X,Z){a=true;E=Z||null;B={success:false,id:X};var ae=c(X);if(ae){if(ae.nodeName=="OBJECT"){l=g(ae);Q=null}else{l=ae;Q=X}aa.id=R;if(typeof aa.width==D||(!/%$/.test(aa.width)&&parseInt(aa.width,10)<310)){aa.width="310"}if(typeof aa.height==D||(!/%$/.test(aa.height)&&parseInt(aa.height,10)<137)){aa.height="137"}j.title=j.title.slice(0,47)+" - Flash Player Installation";var ad=M.ie&&M.win?"ActiveX":"PlugIn",ac="MMredirectURL="+O.location.toString().replace(/&/g,"%26")+"&MMplayerType="+ad+"&MMdoctitle="+j.title;if(typeof ab.flashvars!=D){ab.flashvars+="&"+ac}else{ab.flashvars=ac}if(M.ie&&M.win&&ae.readyState!=4){var Y=C("div");X+="SWFObjectNew";Y.setAttribute("id",X);ae.parentNode.insertBefore(Y,ae);ae.style.display="none";(function(){if(ae.readyState==4){ae.parentNode.removeChild(ae)}else{setTimeout(arguments.callee,10)}})()}u(aa,ab,X)}}function p(Y){if(M.ie&&M.win&&Y.readyState!=4){var X=C("div");Y.parentNode.insertBefore(X,Y);X.parentNode.replaceChild(g(Y),X);Y.style.display="none";(function(){if(Y.readyState==4){Y.parentNode.removeChild(Y)}else{setTimeout(arguments.callee,10)}})()}else{Y.parentNode.replaceChild(g(Y),Y)}}function g(ab){var aa=C("div");if(M.win&&M.ie){aa.innerHTML=ab.innerHTML}else{var Y=ab.getElementsByTagName(r)[0];if(Y){var ad=Y.childNodes;if(ad){var X=ad.length;for(var Z=0;Z<X;Z++){if(!(ad[Z].nodeType==1&&ad[Z].nodeName=="PARAM")&&!(ad[Z].nodeType==8)){aa.appendChild(ad[Z].cloneNode(true))}}}}}return aa}function u(ai,ag,Y){var X,aa=c(Y);if(M.wk&&M.wk<312){return X}if(aa){if(typeof ai.id==D){ai.id=Y}if(M.ie&&M.win){var ah="";for(var ae in ai){if(ai[ae]!=Object.prototype[ae]){if(ae.toLowerCase()=="data"){ag.movie=ai[ae]}else{if(ae.toLowerCase()=="styleclass"){ah+=' class="'+ai[ae]+'"'}else{if(ae.toLowerCase()!="classid"){ah+=" "+ae+'="'+ai[ae]+'"'}}}}}var af="";for(var ad in ag){if(ag[ad]!=Object.prototype[ad]){af+='<param name="'+ad+'" value="'+ag[ad]+'" />'}}aa.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+ah+">"+af+"</object>";N[N.length]=ai.id;X=c(ai.id)}else{var Z=C(r);Z.setAttribute("type",q);for(var ac in ai){if(ai[ac]!=Object.prototype[ac]){if(ac.toLowerCase()=="styleclass"){Z.setAttribute("class",ai[ac])}else{if(ac.toLowerCase()!="classid"){Z.setAttribute(ac,ai[ac])}}}}for(var ab in ag){if(ag[ab]!=Object.prototype[ab]&&ab.toLowerCase()!="movie"){e(Z,ab,ag[ab])}}aa.parentNode.replaceChild(Z,aa);X=Z}}return X}function e(Z,X,Y){var aa=C("param");aa.setAttribute("name",X);aa.setAttribute("value",Y);Z.appendChild(aa)}function y(Y){var X=c(Y);if(X&&X.nodeName=="OBJECT"){if(M.ie&&M.win){X.style.display="none";(function(){if(X.readyState==4){b(Y)}else{setTimeout(arguments.callee,10)}})()}else{X.parentNode.removeChild(X)}}}function b(Z){var Y=c(Z);if(Y){for(var X in Y){if(typeof Y[X]=="function"){Y[X]=null}}Y.parentNode.removeChild(Y)}}function c(Z){var X=null;try{X=j.getElementById(Z)}catch(Y){}return X}function C(X){return j.createElement(X)}function i(Z,X,Y){Z.attachEvent(X,Y);I[I.length]=[Z,X,Y]}function F(Z){var Y=M.pv,X=Z.split(".");X[0]=parseInt(X[0],10);X[1]=parseInt(X[1],10)||0;X[2]=parseInt(X[2],10)||0;return(Y[0]>X[0]||(Y[0]==X[0]&&Y[1]>X[1])||(Y[0]==X[0]&&Y[1]==X[1]&&Y[2]>=X[2]))?true:false}function v(ac,Y,ad,ab){if(M.ie&&M.mac){return}var aa=j.getElementsByTagName("head")[0];if(!aa){return}var X=(ad&&typeof ad=="string")?ad:"screen";if(ab){n=null;G=null}if(!n||G!=X){var Z=C("style");Z.setAttribute("type","text/css");Z.setAttribute("media",X);n=aa.appendChild(Z);if(M.ie&&M.win&&typeof j.styleSheets!=D&&j.styleSheets.length>0){n=j.styleSheets[j.styleSheets.length-1]}G=X}if(M.ie&&M.win){if(n&&typeof n.addRule==r){n.addRule(ac,Y)}}else{if(n&&typeof j.createTextNode!=D){n.appendChild(j.createTextNode(ac+" {"+Y+"}"))}}}function w(Z,X){if(!m){return}var Y=X?"visible":"hidden";if(J&&c(Z)){c(Z).style.visibility=Y}else{v("#"+Z,"visibility:"+Y)}}function L(Y){var Z=/[\\\"<>\.;]/;var X=Z.exec(Y)!=null;return X&&typeof encodeURIComponent!=D?encodeURIComponent(Y):Y}var d=function(){if(M.ie&&M.win){window.attachEvent("onunload",function(){var ac=I.length;for(var ab=0;ab<ac;ab++){I[ab][0].detachEvent(I[ab][1],I[ab][2])}var Z=N.length;for(var aa=0;aa<Z;aa++){y(N[aa])}for(var Y in M){M[Y]=null}M=null;for(var X in swfobject){swfobject[X]=null}swfobject=null})}}();return{registerObject:function(ab,X,aa,Z){if(M.w3&&ab&&X){var Y={};Y.id=ab;Y.swfVersion=X;Y.expressInstall=aa;Y.callbackFn=Z;o[o.length]=Y;w(ab,false)}else{if(Z){Z({success:false,id:ab})}}},getObjectById:function(X){if(M.w3){return z(X)}},embedSWF:function(ab,ah,ae,ag,Y,aa,Z,ad,af,ac){var X={success:false,id:ah};if(M.w3&&!(M.wk&&M.wk<312)&&ab&&ah&&ae&&ag&&Y){w(ah,false);K(function(){ae+="";ag+="";var aj={};if(af&&typeof af===r){for(var al in af){aj[al]=af[al]}}aj.data=ab;aj.width=ae;aj.height=ag;var am={};if(ad&&typeof ad===r){for(var ak in ad){am[ak]=ad[ak]}}if(Z&&typeof Z===r){for(var ai in Z){if(typeof am.flashvars!=D){am.flashvars+="&"+ai+"="+Z[ai]}else{am.flashvars=ai+"="+Z[ai]}}}if(F(Y)){var an=u(aj,am,ah);if(aj.id==ah){w(ah,true)}X.success=true;X.ref=an}else{if(aa&&A()){aj.data=aa;P(aj,am,ah,ac);return}else{w(ah,true)}}if(ac){ac(X)}})}else{if(ac){ac(X)}}},switchOffAutoHideShow:function(){m=false},ua:M,getFlashPlayerVersion:function(){return{major:M.pv[0],minor:M.pv[1],release:M.pv[2]}},hasFlashPlayerVersion:F,createSWF:function(Z,Y,X){if(M.w3){return u(Z,Y,X)}else{return undefined}},showExpressInstall:function(Z,aa,X,Y){if(M.w3&&A()){P(Z,aa,X,Y)}},removeSWF:function(X){if(M.w3){y(X)}},createCSS:function(aa,Z,Y,X){if(M.w3){v(aa,Z,Y,X)}},addDomLoadEvent:K,addLoadEvent:s,getQueryParamValue:function(aa){var Z=j.location.search||j.location.hash;if(Z){if(/\?/.test(Z)){Z=Z.split("?")[1]}if(aa==null){return L(Z)}var Y=Z.split("&");for(var X=0;X<Y.length;X++){if(Y[X].substring(0,Y[X].indexOf("="))==aa){return L(Y[X].substring((Y[X].indexOf("=")+1)))}}}return""},expressInstallCallback:function(){if(a){var X=c(R);if(X&&l){X.parentNode.replaceChild(l,X);if(Q){w(Q,true);if(M.ie&&M.win){l.style.display="block"}}if(E){E(B)}}a=false}}}}();ï»¿
(function(d){d.anythingSlider=function(h,j){var a=this,b;a.$el=d(h).addClass("anythingBase").wrap('<div class="anythingSlider"><div class="anythingWindow" /></div>');a.$el.data("AnythingSlider",a);a.init=function(){a.options=b=d.extend({},d.anythingSlider.defaults,j);a.initialized=!1;d.isFunction(b.onBeforeInitialize)&&a.$el.bind("before_initialize",b.onBeforeInitialize);a.$el.trigger("before_initialize",a);a.$wrapper=a.$el.parent().closest("div.anythingSlider").addClass("anythingSlider-"+b.theme);a.$window=a.$el.closest("div.anythingWindow");a.win=window;a.$win=d(a.win);a.$controls=d('<div class="anythingControls"></div>').appendTo(b.appendControlsTo!==null&&d(b.appendControlsTo).length?d(b.appendControlsTo):a.$wrapper);a.$startStop=d('<a href="#" class="start-stop"></a>');b.buildStartStop&&a.$startStop.appendTo(b.appendStartStopTo!==null&&d(b.appendStartStopTo).length?d(b.appendStartStopTo):a.$controls);a.$nav=d('<ul class="thumbNav" />').appendTo(b.appendNavigationTo!==null&&d(b.appendNavigationTo).length?d(b.appendNavigationTo):a.$controls);a.flag=!1;a.playing=b.autoPlay;a.slideshow=!1;a.hovered=!1;a.panelSize=[];a.currentPage=b.startPanel=parseInt(b.startPanel,10)||1;a.adj=b.infiniteSlides?0:1;a.width=a.$el.width();a.height=a.$el.height();a.outerPad=[a.$wrapper.innerWidth()-a.$wrapper.width(),a.$wrapper.innerHeight()-a.$wrapper.height()];b.playRtl&&a.$wrapper.addClass("rtl");if(b.expand)a.$outer=a.$wrapper.parent(),a.$window.css({width:"100%",height:"100%"}),a.checkResize();b.buildStartStop&&a.buildAutoPlay();b.buildArrows&&a.buildNextBackButtons();if(!b.autoPlay)b.autoPlayLocked=!1;a.updateSlider();a.$lastPage=a.$currentPage;a.runTimes=d("div.anythingSlider").index(a.$wrapper)+1;a.regex=RegExp("panel"+a.runTimes+"-(\\d+)","i");a.runTimes===1&&a.makeActive();if(!d.isFunction(d.easing[b.easing]))b.easing="swing";b.pauseOnHover&&a.$wrapper.hover(function(){a.playing&&(a.$el.trigger("slideshow_paused",a),a.clearTimer(!0))},function(){a.playing&&(a.$el.trigger("slideshow_unpaused",a),a.startStop(a.playing,!0))});var c,e=b.hashTags?a.gotoHash()||b.startPanel:b.startPanel;a.setCurrentPage(e,!1);a.slideControls(!1);a.$wrapper.bind("mouseenter mouseleave",function(b){a.hovered=b.type==="mouseenter"?!0:!1;a.slideControls(a.hovered,!1)});d(document).keyup(function(c){if(b.enableKeyboard&&a.$wrapper.is(".activeSlider")&&!c.target.tagName.match("TEXTAREA|INPUT|SELECT"))switch(c.which){case 39:a.goForward();break;case 37:a.goBack()}});a.$items.delegate("a","focus.AnythingSlider",function(c){var e=d(this).closest(".panel"),i=a.$items.index(e)+a.adj;a.$items.find(".focusedLink").removeClass("focusedLink");d(this).addClass("focusedLink");a.$window.scrollLeft(0);!e.is(".activePage")&&a.currentPage+b.showMultiple-1>i&&(a.gotoPage(i),c.preventDefault())});c="slideshow_paused slideshow_unpaused slide_init slide_begin slideshow_stop slideshow_start initialized swf_completed".split(" ");d.each("onShowPause onShowUnpause onSlideInit onSlideBegin onShowStop onShowStart onInitialized onSWFComplete".split(" "),function(e,f){d.isFunction(b[f])&&a.$el.bind(c[e],b[f])});d.isFunction(b.onSlideComplete)&&a.$el.bind("slide_complete",function(){setTimeout(function(){b.onSlideComplete(a)},0)});a.initialized=!0;a.$el.trigger("initialized",a);a.startStop(a.playing)};a.updateSlider=function(){a.$el.children(".cloned").remove();a.$nav.empty();a.currentPage=a.currentPage||1;a.$items=a.$el.children();a.pages=a.$items.length;b.showMultiple=parseInt(b.showMultiple,10)||1;if(b.showMultiple>1){if(b.showMultiple>a.pages)b.showMultiple=a.pages;a.adjustMultiple=b.infiniteSlides&&a.pages>1?0:b.showMultiple-1;a.pages=a.$items.length-a.adjustMultiple}a.$controls.add(a.$nav).add(a.$startStop).add(a.$forward).add(a.$back)[a.pages<=1?"hide":"show"]();a.pages>1&&a.buildNavigation();b.infiniteSlides&&a.pages>1&&(a.$el.prepend(a.$items.filter(":last").clone().removeAttr("id").addClass("cloned")),b.showMultiple>1?a.$el.append(a.$items.filter(":lt("+b.showMultiple+")").clone().removeAttr("id").addClass("cloned").addClass("multiple")):a.$el.append(a.$items.filter(":first").clone().removeAttr("id").addClass("cloned")),a.$el.find(".cloned").each(function(){d(this).find("a,input,textarea,select,button,area").attr("disabled","disabled");d(this).find("[id]").removeAttr("id")}));a.$items=a.$el.children().addClass("panel");a.setDimensions();b.resizeContents?(a.$items.css("width",a.width),a.$wrapper.css("width",a.getDim(a.currentPage)[0]),a.$wrapper.add(a.$items).css("height",a.height)):a.$win.load(function(){a.setDimensions()});if(a.currentPage>a.pages)a.currentPage=a.pages;a.setCurrentPage(a.currentPage,!1);a.$nav.find("a").eq(a.currentPage-1).addClass("cur")};a.buildNavigation=function(){if(b.buildNavigation&&a.pages>1){var c,e;a.$items.filter(":not(.cloned)").each(function(g){var f=g+1;c=(f===1?"first":"")+(f===a.pages?"last":"");e=d('<a href="#"></a>').addClass("panel"+f).wrap('<li class="'+c+'" />');a.$nav.append(e.parent());d.isFunction(b.navigationFormatter)?(c=b.navigationFormatter(f,d(this)),e.html("<span>"+c+"</span>"),parseInt(e.find("span").css("text-indent"),10)<0&&e.addClass(b.tooltipClass).attr("title",c)):e.html("<span>"+f+"</span>");e.bind(b.clickControls,function(c){if(!a.flag&&b.enableNavigation)a.flag=!0,setTimeout(function(){a.flag=!1},100),a.gotoPage(f),b.hashTags&&a.setHash(f);c.preventDefault()})});if(b.navigationSize!==!1&&parseInt(b.navigationSize,10)<a.pages)a.$controls.find(".anythingNavWindow").length||a.$nav.before('<ul><li class="prev"><a href="#"><span>'+b.backText+"</span></a></li></ul>").after('<ul><li class="next"><a href="#"><span>'+b.forwardText+"</span></a></li></ul>").wrap('<div class="anythingNavWindow"></div>'),a.navWidths=a.$nav.find("li").map(function(){return d(this).innerWidth()}).get(),a.navLeft=1,a.$nav.width(a.navWidth(1,a.pages+1)+5),a.$controls.find(".anythingNavWindow").width(a.navWidth(1,b.navigationSize+1)).end().find(".prev,.next").bind(b.clickControls,function(c){if(!a.flag)a.flag=!0,setTimeout(function(){a.flag=!1},200),a.navWindow(a.navLeft+b.navigationSize*(d(this).is(".prev")?-1:1));c.preventDefault()})}};a.navWidth=function(b,e){for(var d=Math.min(b,e),f=Math.max(b,e),i=0;d<f;d++)i+=a.navWidths[d-1]||0;return i};a.navWindow=function(c){var e=a.pages-b.navigationSize+1,c=c<=1?1:c>1&&c<e?c:e;if(c!==a.navLeft)a.$controls.find(".anythingNavWindow").animate({scrollLeft:a.navWidth(1,c),width:a.navWidth(c,c+b.navigationSize)},{queue:!1,duration:b.animationTime}),a.navLeft=c};a.buildNextBackButtons=function(){a.$forward=d('<span class="arrow forward"><a href="#"><span>'+b.forwardText+"</span></a></span>");a.$back=d('<span class="arrow back"><a href="#"><span>'+b.backText+"</span></a></span>");a.$back.bind(b.clickBackArrow,function(c){if(b.enableArrows&&!a.flag)a.flag=!0,setTimeout(function(){a.flag=!1},100),a.goBack();c.preventDefault()});a.$forward.bind(b.clickForwardArrow,function(c){if(b.enableArrows&&!a.flag)a.flag=!0,setTimeout(function(){a.flag=!1},100),a.goForward();c.preventDefault()});a.$back.add(a.$forward).find("a").bind("focusin focusout",function(){d(this).toggleClass("hover")});a.$forward.appendTo(b.appendForwardTo!==null&&d(b.appendForwardTo).length?d(b.appendForwardTo):a.$wrapper);a.$back.appendTo(b.appendBackTo!==null&&d(b.appendBackTo).length?d(b.appendBackTo):a.$wrapper);a.$arrowWidth=a.$forward.width()};a.buildAutoPlay=function(){a.$startStop.html("<span>"+(a.playing?b.stopText:b.startText)+"</span>").bind(b.clickSlideshow,function(c){b.enableStartStop&&(a.startStop(!a.playing),a.makeActive(),a.playing&&!b.autoPlayDelayed&&a.goForward(!0));c.preventDefault()}).bind("focusin focusout",function(){d(this).toggleClass("hover")})};a.checkResize=function(c){clearTimeout(a.resizeTimer);a.resizeTimer=setTimeout(function(){var e=a.$outer.width()-a.outerPad[0],d=(a.$outer[0].tagName==="BODY"?a.$win.height():a.$outer.height())-a.outerPad[1];if(a.width*b.showMultiple!==e||a.height!==d)a.setDimensions(),a.gotoPage(a.currentPage,a.playing,null,1);typeof c==="undefined"&&a.checkResize()},500)};a.setDimensions=function(){var c,e,g,f=0,i=b.showMultiple>1?a.width||a.$window.width()/b.showMultiple:a.$window.width(),h=a.$win.width();if(b.expand)c=a.$outer.width()-a.outerPad[0],a.height=e=a.$outer.height()-a.outerPad[1],a.$wrapper.add(a.$window).add(a.$items).css({width:c,height:e}),a.width=i=b.showMultiple>1?c/b.showMultiple:c;a.$items.each(function(j){g=d(this).children();b.resizeContents?(c=a.width,d(this).css({width:c,height:a.height}),g.length&&g[0].tagName==="EMBED"&&g.attr({width:"100%",height:"100%"}),g.length===1&&g.css({width:"100%",height:"100%"})):(c=d(this).width(),g.length===1&&c>=h&&(c=g.width()>=h?i:g.width(),g.css("max-width",c)),d(this).css("width",c),e=d(this).outerHeight(),d(this).css("height",e));a.panelSize[j]=[c,e,f];f+=c});a.$el.css("width",f)};a.getDim=function(c){if(a.pages<1)return[a.width,a.height];var c=b.infiniteSlides&&a.pages>1?c:c-1,e,d=a.panelSize[c][0],f=a.panelSize[c][1];if(b.showMultiple>1)for(e=1;e<b.showMultiple;e++)d+=a.panelSize[(c+e)%b.showMultiple][0],f=Math.max(f,a.panelSize[c+e][1]);return[d,f]};a.goForward=function(c){a.gotoPage(a.currentPage+parseInt(b.changeBy,10)*(b.playRtl?-1:1),c)};a.goBack=function(c){a.gotoPage(a.currentPage+parseInt(b.changeBy,10)*(b.playRtl?1:-1),c)};a.gotoPage=function(c,d,g,f){d!==!0&&(d=!1,a.startStop(!1),a.makeActive());b.changeBy!==1&&(c<0&&(c+=a.pages),c>a.pages&&(c-=a.pages));if(!(a.pages<=1)){a.$lastPage=a.$currentPage;if(typeof c!=="number")c=b.startPanel,a.setCurrentPage(c);if(!d||!b.isVideoPlaying(a))c>a.pages+1-a.adj&&(c=!b.infiniteSlides&&!b.stopAtEnd?1:a.pages),c<a.adj&&(c=!b.infiniteSlides&&!b.stopAtEnd?a.pages:1),a.currentPage=c>a.pages?a.pages:c<1?1:a.currentPage,a.$currentPage=a.$items.eq(a.currentPage-a.adj),a.exactPage=c,a.$targetPage=a.$items.eq(c===0?a.pages-a.adj:c>a.pages?1-a.adj:c-a.adj),f=f||b.animationTime,f>1&&a.$el.trigger("slide_init",a),a.slideControls(!0,!1),d!==!0&&(d=!1),(!d||b.stopAtEnd&&c===a.pages)&&a.startStop(!1),f>1&&a.$el.trigger("slide_begin",a),b.resizeContents||(d=a.getDim(c),a.$wrapper.filter(":not(:animated)").animate({width:d[0]||a.width,height:d[1]||a.height},{queue:!1,duration:f,easing:b.easing})),a.$el.filter(":not(:animated)").animate({left:-a.panelSize[b.infiniteSlides&&a.pages>1?c:c-1][2]},{queue:!1,duration:f,easing:b.easing,complete:function(){a.endAnimation(c,g,f)}})}};a.endAnimation=function(c,d,g){c===0?(a.$el.css("left",-a.panelSize[a.pages][2]),c=a.pages):c>a.pages&&(a.$el.css("left",-a.panelSize[1][2]),c=1);a.exactPage=c;a.setCurrentPage(c,!1);a.$items.removeClass("activePage").eq(c-a.adj).addClass("activePage");a.hovered||a.slideControls(!1);g>1&&a.$el.trigger("slide_complete",a);typeof d==="function"&&d(a);b.autoPlayLocked&&!a.playing&&setTimeout(function(){a.startStop(!0)},b.resumeDelay-(b.autoPlayDelayed?b.delay:0))};a.setCurrentPage=function(c,d){c=parseInt(c,10);if(!(a.pages<1||c===0)){c>a.pages+1-a.adj&&(c=a.pages-a.adj);c<a.adj&&(c=1);b.buildNavigation&&a.$nav.find(".cur").removeClass("cur").end().find("a").eq(c-1).addClass("cur");!b.infiniteSlides&&b.stopAtEnd&&(a.$wrapper.find("span.forward")[c===a.pages?"addClass":"removeClass"]("disabled").end().find("span.back")[c===1?"addClass":"removeClass"]("disabled"),c===a.pages&&a.playing&&a.startStop());if(!d){var g=a.getDim(c);a.$wrapper.css({width:g[0],height:g[1]}).add(a.$window).scrollLeft(0);a.$el.css("left",-a.panelSize[b.infiniteSlides&&a.pages>1?c:c-1][2])}a.currentPage=c;a.$currentPage=a.$items.removeClass("activePage").eq(c-a.adj).addClass("activePage")}};a.makeActive=function(){a.$wrapper.is(".activeSlider")||(d(".activeSlider").removeClass("activeSlider"),a.$wrapper.addClass("activeSlider"))};a.gotoHash=function(){var b=a.win.location.hash.match(a.regex);return b===null?"":parseInt(b[1],10)};a.setHash=function(b){var d="panel"+a.runTimes+"-",g=a.win.location.hash;if(typeof g!=="undefined")a.win.location.hash=g.indexOf(d)>0?g.replace(a.regex,d+b):g+"&"+d+b};a.slideControls=function(c){var d=c?0:b.animationTime,g=c?b.animationTime:0,f=c?1:0,h=c?0:1;b.toggleControls&&a.$controls.stop(!0,!0).delay(d)[c?"slideDown":"slideUp"](b.animationTime/2).delay(g);b.buildArrows&&b.toggleArrows&&(!a.hovered&&a.playing&&(h=1,f=0),a.$forward.stop(!0,!0).delay(d).animate({right:h*a.$arrowWidth,opacity:f},b.animationTime/2),a.$back.stop(!0,!0).delay(d).animate({left:h*a.$arrowWidth,opacity:f},b.animationTime/2))};a.clearTimer=function(b){if(a.timer&&(a.win.clearInterval(a.timer),!b&&a.slideshow))a.$el.trigger("slideshow_stop",a),a.slideshow=!1};a.startStop=function(c,d){c!==!0&&(c=!1);if((a.playing=c)&&!d)a.$el.trigger("slideshow_start",a),a.slideshow=!0;b.buildStartStop&&(a.$startStop.toggleClass("playing",c).find("span").html(c?b.stopText:b.startText),parseInt(a.$startStop.find("span").css("text-indent"),10)<0&&a.$startStop.addClass(b.tooltipClass).attr("title",c?b.stopText:b.startText));c?(a.clearTimer(!0),a.timer=a.win.setInterval(function(){b.isVideoPlaying(a)?b.resumeOnVideoEnd||a.startStop():a.goForward(!0)},b.delay)):a.clearTimer()};a.init()};d.anythingSlider.defaults={theme:"default",expand:!1,resizeContents:!0,showMultiple:!1,easing:"swing",buildArrows:!0,buildNavigation:!0,buildStartStop:!0,appendForwardTo:null,appendBackTo:null,appendControlsTo:null,appendNavigationTo:null,appendStartStopTo:null,toggleArrows:!1,toggleControls:!1,startText:"Start",stopText:"Stop",forwardText:"&raquo;",backText:"&laquo;",tooltipClass:"tooltip",enableArrows:!0,enableNavigation:!0,enableStartStop:!0,enableKeyboard:!0,startPanel:1,changeBy:1,hashTags:!0,infiniteSlides:!0,navigationFormatter:null,navigationSize:!1,autoPlay:!1,autoPlayLocked:!1,autoPlayDelayed:!1,pauseOnHover:!0,stopAtEnd:!1,playRtl:!1,delay:3E3,resumeDelay:15E3,animationTime:600,clickForwardArrow:"click",clickBackArrow:"click",clickControls:"click focusin",clickSlideshow:"click",resumeOnVideoEnd:!0,addWmodeToObject:"opaque",isVideoPlaying:function(){return!1}};d.fn.anythingSlider=function(h,j){return this.each(function(){var a,b=d(this).data("AnythingSlider");(typeof h).match("object|undefined")?b?b.updateSlider():new d.anythingSlider(this,h):/\d/.test(h)&&!isNaN(h)&&b&&(a=typeof h==="number"?h:parseInt(d.trim(h),10),a>=1&&a<=b.pages&&b.gotoPage(a,!1,j))})}})(jQuery);jQuery.cookie=function(a,b,c){if(arguments.length>1&&String(b)!=="[object Object]"){c=jQuery.extend({},c);if(b===null||b===undefined){c.expires=-1}if(typeof c.expires==="number"){var d=c.expires,e=c.expires=new Date;e.setDate(e.getDate()+d)}b=String(b);return document.cookie=[encodeURIComponent(a),"=",c.raw?b:encodeURIComponent(b),c.expires?"; expires="+c.expires.toUTCString():"",c.path?"; path="+c.path:"",c.domain?"; domain="+c.domain:"",c.secure?"; secure":""].join("")}c=b||{};var f,g=c.raw?function(a){return a}:decodeURIComponent;return(f=(new RegExp("(?:^|; )"+encodeURIComponent(a)+"=([^;]*)")).exec(document.cookie))?g(f[1]):null}
