url=document.location.href;xend=url.lastIndexOf("/")+1;rootURL=url.substring(0,xend);var slide_show_active=0;var curr_pic=0;var txt_size=1;function turnOn(imgName){if(document.images){document[imgName].src=eval(imgName+'on.src');}}
function turnOff(imgName){if(document.images){document[imgName].src=eval(imgName+'off.src');}}
function funnel_win(theURL,winName,width,height){var myWin=window.open(theURL,winName);}
function MM_findObj(n,d){var p,i,x;if(!d)d=document;if((p=n.indexOf("?"))>0&&parent.frames.length){d=parent.frames[n.substring(p+1)].document;n=n.substring(0,p);}
if(!(x=d[n])&&d.all)x=d.all[n];for(i=0;!x&&i<d.forms.length;i++)x=d.forms[i][n];for(i=0;!x&&d.layers&&i<d.layers.length;i++)x=MM_findObj(n,d.layers[i].document);if(!x&&d.getElementById)x=d.getElementById(n);return x;}
function MM_showHideLayers(){var i,p,v,obj,args=MM_showHideLayers.arguments;for(i=0;i<(args.length-2);i+=3)if((obj=MM_findObj(args[i]))!=null){v=args[i+2];if(obj.style){obj=obj.style;v=(v=='show')?'visible':(v='hide')?'hidden':v;}
obj.visibility=v;}}
function MM_swapImgRestore(){var i,x,a=document.MM_sr;for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++)x.src=x.oSrc;}
function MM_preloadImages(){var d=document;if(d.images){if(!d.MM_p)d.MM_p=new Array();var i,j=d.MM_p.length,a=MM_preloadImages.arguments;for(i=0;i<a.length;i++)
if(a[i].indexOf("#")!=0){d.MM_p[j]=new Image;d.MM_p[j++].src=a[i];}}}
function MM_swapImage(){var i,j=0,x,a=MM_swapImage.arguments;document.MM_sr=new Array;for(i=0;i<(a.length-2);i+=3)
if((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x;if(!x.oSrc)x.oSrc=x.src;x.src=a[i+2];}}
function enlargeRuler(){minPageHeight=287;minRulerHeight=0;if(document.layers){if(window.innerHeight>minPageHeight)document.images['ruler'].height=(window.innerHeight-minPageHeight)+minRulerHeight;}
else if(document.documentElement.clientHeight>0){if(document.documentElement.clientHeight>minPageHeight)document.images['ruler'].height=(document.documentElement.clientHeight-minPageHeight)+minRulerHeight;}
else{if(document.body.clientHeight>minRulerHeight)document.images['ruler'].height=(document.body.clientHeight-minPageHeight)+minRulerHeight;}}
function myRuler(){minPageHeight=287;minRulerHeight=0;if(document.layers)document.write('<img src=\"'+rootURL+'pub/images/dot.gif\" width=\"1\" height=\"'+((window.innerHeight>minPageHeight)?(window.innerHeight-(minPageHeight+10))+minRulerHeight:1)+'\" name=\"ruler\">');else document.write('<img src=\"'+rootURL+'pub/images/dot.gif\" width=\"1\" height=\"1\" name=\"ruler\">');}
function changePic(pic_id){document.getElementById('main_img').src=pic_id;}
function toggleIt(id){var f=document.getElementById(id);if(f.style.display=='block'){f.style.display='none';}
else
{f.style.display='block';}}
function slideShow(block_id,id,speed,action_id){var imgblocks=document.getElementsByName('bttn_ss_'+block_id);var imgButtons=document.getElementsByName('tween_'+block_id);var state=document.getElementById('slide_show_state_'+block_id);var counter;counter=id;if(Number(state.value)==0||action_id==1){if(action_id==0){for(i=0;i<imgblocks.length;i++)imgButtons[i].src='pub/images/pause.gif';state.value='1'}
if(state.value=='1'){chngImg(block_id,counter,3);counter++;if(counter>=imgblocks.length)counter=0;setTimeout('slideShow('+block_id+','+counter+', '+speed+',1);',speed*1000)}}
else{for(i=0;i<imgblocks.length;i++)imgButtons[i].src='pub/images/play.gif';state.value='0'}}
function slideit(block_id,id){}
function chngImg(block_id,id,action_id){var imgblocks=document.getElementsByName('bttn_ss_'+block_id);if(imgblocks.length>1){for(i=0;i<imgblocks.length;i++){document.getElementById('ss_'+block_id+'_'+i).className='';document.getElementById('ss_'+block_id+'_'+i).style.display='none';}
if(action_id==1){document.getElementById('ss_'+block_id+'_'+0).style.display='';}
else if(action_id==2){if(id==0)id=imgblocks.length
document.getElementById('ss_'+block_id+'_'+Number((Number(id)-1))).style.display='';}
else if(action_id==3){if(id==(imgblocks.length-1))id=-1
document.getElementById('ss_'+block_id+'_'+Number((Number(id)+1))).style.display='';}
else if(action_id==4){document.getElementById('ss_'+block_id+'_'+(imgblocks.length-1)).style.display='';}
else{document.getElementById('ss_'+block_id+'_'+0).style.display='';}}}
function expandCollapseMenu(){var aMcurrentState=document.getElementById('ab0_1').style.display;if(aMcurrentState=='none'){for(i=1;i<=9;i++){document.getElementById('ab0_'+i).style.display='';}}
else{for(i=1;i<=9;i++){document.getElementById('ab0_'+i).style.display='none';}}
return false;}
function moveDualList(srcList,destList){var moveAll=false;if((srcList.selectedIndex==-1)&&(moveAll==false)){return false;}
newDestList=new Array(destList.options.length);var len=0;for(len=0;len<destList.options.length;len++){if(destList.options[len]!=null){newDestList[len]=new Option(destList.options[len].text,destList.options[len].value,destList.options[len].defaultSelected,destList.options[len].selected);}}
for(var i=0;i<srcList.options.length;i++){if(srcList.options[i]!=null&&(srcList.options[i].selected==true||moveAll)){newDestList[len]=new Option(srcList.options[i].text,srcList.options[i].value,srcList.options[i].defaultSelected,srcList.options[i].selected);len++;}}
var tmp;for(var j=0;j<newDestList.length;j++){if(newDestList[j]!=null){destList.options[j]=newDestList[j];}}
for(var i=srcList.options.length-1;i>=0;i--){if(srcList.options[i]!=null&&(srcList.options[i].selected==true||moveAll)){srcList.options[i]=null;}}
for(var i=1;i<destList.options.length;i++){for(var j=i;j<destList.length;j++){if(destList.options[j-1].text>destList.options[j].text){var tmp=destList.options[j].text;destList.options[j].text=destList.options[j-1].text;destList.options[j-1].text=tmp;tmp=destList.options[j].value;destList.options[j].value=destList.options[j-1].value;destList.options[j-1].value=tmp;tmp=destList.options[j].selected;destList.options[j].selected=destList.options[j-1].selected;destList.options[j-1].selected=tmp;}}}
return false;}
function changeFontSize(elementID,size){if(1==1){var fontsize=0;}}
function validateBlogComment(){var oForm=document.commentForm;oErrMsg.initErrMsgs();chkEmptyFld(oForm.txt_name,'Name');chkValidEmail(oForm.txt_email,'Email Address');if(document.getElementById('Captcha_Security_Code')){chkEmptyFld(oForm.Captcha_Security_Code,'Security Code');}
if(oErrMsg.errMsgAdded==true){oErrMsg.dispErrMsgs();oErrMsg.focusFirst();return false;}
else{return true;}}
function checkTxtaLength(theField,theLimit){if(theField.value.length>theLimit){theField.value=theField.value.substring(0,theLimit);}}
function Left(str,n){if(n<=0)
return"";else if(n>String(str).length)
return str;else
return String(str).substring(0,n);}
function Right(str,n){if(n<=0)
return"";else if(n>String(str).length)
return str;else{var iLen=String(str).length;return String(str).substring(iLen,iLen-n);}}
function getParameterByName(name){name=name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");var regexS="[\\?&]"+name+"=([^&#]*)";var regex=new RegExp(regexS);var results=regex.exec(window.location.href);if(results==null)
return"";else
return results[1];}
