if(document.all)
{nav="ie4";doc="document.all";brO="[";brC="]";wdth=".offsetWidth";sty=".style";}
else if(document.layers)
{nav="ns4";doc="document";brO="[";brC="]";wdth=".clip.width";sty="";}
else if(document.getElementById)
{nav="ns6";doc="document.getElementById";brO="(";brC=")";wdth=".offsetWidth";sty=".style";}
function rolloverImage(imgName,state)
{newSrc=eval(imgName+'_'+state+'.src');eval(doc+brO+'imgName'+brC+'.src=\''+newSrc+'\';');}
function showHide(DivID)
{DIVObject=eval(doc+brO+"'"+DivID+"'"+brC+sty);if(typeof(DIVObject)!=null)
{if(DIVObject.display=='none')
{DIVObject.display='inline';}
else
{DIVObject.display='none';}}}
function addBookmark()
{if(window.sidebar)
{window.sidebar.addPanel(document.title,location.href,"");}
else
{window.external.AddFavorite(location.href,document.title);}}
var sizeIncrease=0;function changeFontSize(value)
{for(s=0;s<document.styleSheets.length;s++)
{var currMedia=document.styleSheets[s].media.mediaText;var currHREF=document.styleSheets[s].href;if(currHREF!=null&&currHREF.indexOf(s_js.siteLocation)>=0)
{var currCSS=document.styleSheets[s].cssRules;if(document.all)
{var currCSS=document.styleSheets[s].rules;}
for(r=0;r<currCSS.length;r++)
{if(currCSS[r].selectorText=='body'||currCSS[r].selectorText=='BODY')
{if(currCSS[r].style.fontSize!='')
{var currentSize=currCSS[r].style.fontSize;var currentSheet=s;var currentRule=r;break;}
else if(currCSS[r].style.font!='')
{var currentSize=currCSS[r].style.font;currentSize=currentSize.substr(0,currentSize.indexOf('em'));currentSize=currentSize.substr(currentSize.lastIndexOf(' '));var currentSheet=s;var currentRule=r;break;}}}}}
currentSize=currentSize.replace('em','');if(value>0)
{newSize=parseFloat(currentSize)+parseFloat(value);sizeIncrease=parseFloat(sizeIncrease)+parseFloat(value);if(document.all)
{document.styleSheets[currentSheet].rules[currentRule].style.fontSize=newSize+'em';}
else
{document.styleSheets[currentSheet].cssRules[currentRule].style.fontSize=newSize+'em';}}
else if(value<0&sizeIncrease>0)
{newSize=parseFloat(currentSize)+parseFloat(value);sizeIncrease=parseFloat(sizeIncrease)+parseFloat(value);if(document.all)
{document.styleSheets[currentSheet].rules[currentRule].style.fontSize=newSize+'em';}
else
{document.styleSheets[currentSheet].cssRules[currentRule].style.fontSize=newSize+'em';}}}
sfHover=function()
{if(typeof document.all.main_nav!='undefined')
{var sfEls=document.getElementById("main_nav").getElementsByTagName("li");for(var i=0;i<sfEls.length;i++){sfEls[i].onmouseover=function(){this.className+=" sfhover";}
sfEls[i].onmouseout=function(){this.className=this.className.replace(new RegExp(" sfhover\\b"),"");}}}}
if(window.attachEvent)window.attachEvent("onload",sfHover);var s_lighbox={divid:'DIV_properties',closeLink:'<a class="lboxclslink" style="float:right; margin:5px; cursor:pointer;" onclick="JS_closeLightBox();">[x]</a>',underlayClickToClose:true,unsavedChanges:false};function JS_closeLightBox(){if(s_lighbox.unsavedChanges)
{if(confirm('you have unsaved changes\n\nare you sure you want to discard these changes?'))
{s_lighbox.unsavedChanges=false;JS_closeLightBox();}}
else
{jQuery('.site_underlay').hide();jQuery('#'+s_lighbox.divid+' iframe').hide();jQuery('#'+s_lighbox.divid).fadeOut(function(){jQuery('#'+s_lighbox.divid).html('');jQuery('embed, object, iframe').css({'visibility':'visible'});});}}
function JS_displayLightBox(strContent){if(document.getElementById(s_lighbox.divid).innerHTML=='')
{jQuery('embed, object, iframe').css({'visibility':'hidden'});jQuery('.site_underlay')
.css({'position':'absolute','top':'0px','left':'0px','z-index':'998','opacity':'0.7','height':jQuery(document).height(),'width':jQuery(document).width(),'backgroundColor':'black'})
.show().click(function(){if(s_lighbox.underlayClickToClose)
{JS_closeLightBox();}});jQuery('#'+s_lighbox.divid)
.css({'padding':'5px','position':'absolute','z-index':'999','border':'10px solid black','backgroundColor':'white'})
.fadeIn();}
jQuery('#'+s_lighbox.divid).html(s_lighbox.closeLink+strContent);JS_positionLightBox();}
function JS_updateLightBox(strContent){jQuery('#'+s_lighbox.divid).html(strContent);}
function JS_positionLightBox(){if(document.getElementById(s_lighbox.divid).innerHTML!='')
{jQuery('#'+s_lighbox.divid).removeAttr("height").removeAttr("width").css({width:"",height:""});posWidth=jQuery('#'+s_lighbox.divid).width();jQuery('#'+s_lighbox.divid).css({'width':posWidth});posWidth+=20;posLeft=(jQuery(window).width()-posWidth)/2+jQuery(window).scrollLeft();if(posLeft<0)
{posLeft=0;}
posTop=((jQuery(window).height()-jQuery('#'+s_lighbox.divid).height())/2+jQuery(window).scrollTop()-80);if(posTop<=jQuery(window).scrollTop()+10)
{posTop=jQuery(window).scrollTop()+10;}
jQuery('#'+s_lighbox.divid).css({'top':posTop+'px','left':posLeft+'px'});}}
function JS_DPAControl(strType,AssocItem,AssocItemID){strURL=s_js.siteLocation+'page.cfm?goajax=dpaControl&dpaAction='+strType+'_'+AssocItem+'_'+AssocItemID+'&t=m';jQuery.ajax({type:'get',url:strURL+'&RNDID='+Math.random(),dataType:'html',success:function(htmlDoc){jQuery('.vz_DPA_button').html(htmlDoc);},error:function(XMLHttpRequest,textStatus,errorThrown){}});}
function JS_briefcaseControl(AssocItem,AssocItemID,briefcaseItemID,type)
{if(type==null)
{type='item';}
briefcaseAction='';if(briefcaseItemID>0)
{briefcaseAction+='removeItem_'+briefcaseItemID;}
else
{AssocItem=AssocItem.replace('_','-');briefcaseAction+='add'+type+'_'+AssocItem+'_'+AssocItemID;}
strURL=s_js.siteLocation+'page.cfm?goajax=briefcaseControl&briefcaseaction='+briefcaseAction;jQuery.ajax({type:'get',url:strURL+'&RNDID='+Math.random(),dataType:'xml',success:function(xmlDoc){var AssocItem=jQuery(xmlDoc).find('AssocItem').text();if(AssocItem=='invalidLogin')
{self.location=s_js.siteLocation+'page.cfm/action=VZone/briefcaseAction='+briefcaseAction;}
else if(AssocItem!='')
{if(jQuery(xmlDoc).find('statusText').text()!='')
{JS_displayLightBox(jQuery(xmlDoc).find('statusText').text());}
else
{var AssocItemID=jQuery(xmlDoc).find('AssocItemID').text();var briefcaseItemID=jQuery(xmlDoc).find('briefcaseItemID').text();globalDivName='div_briefcase'+type+'_'+AssocItem.replace('-','_');divName=globalDivName+'_'+AssocItemID;jQuery('#'+divName+'_Text').html('<a href="JavaScript:JS_briefcaseControl(\''+AssocItem+'\','+AssocItemID+','+briefcaseItemID+',\''+type+'\');">'+jQuery(xmlDoc).find('iconText').text()+'</a>');jQuery('#'+divName+'_Tag').html('<a href="JavaScript:JS_briefcaseControl(\''+AssocItem+'\','+AssocItemID+','+briefcaseItemID+',\''+type+'\');">'+jQuery(xmlDoc).find('iconTag').text()+'</a>');jQuery('.'+globalDivName).html('<a href="JavaScript:JS_briefcaseControl(\''+AssocItem+'\','+AssocItemID+','+briefcaseItemID+',\''+type+'\');">'+jQuery(xmlDoc).find('iconTag').text()+'</a>');}}},error:function(XMLHttpRequest,textStatus,errorThrown){;}});}
function JS_applyStarRating()
{jQuery(".starRatingSubmit").hide();jQuery(".starRating").rating({cancelShow:false,callback:function(ui){starName=this.name;value=this.value;briefcaseaction='starRating&'+this.name+'='+value;strURL=s_js.siteLocation+'page.cfm?goajax=briefcaseControl&briefcaseaction='+briefcaseaction;jQuery.ajax({type:'get',url:strURL+'&rndID='+Math.random(),dataType:'xml',success:function(xmlDoc){if(jQuery(xmlDoc).find('AssocItem').text()=='invalidLogin')
{self.location=s_js.siteLocation+'page.cfm?action=VZone&briefcaseAction='+briefcaseaction;}}});}});}
function JS_libraryEntry_load(targetElement,moduleStruct)
{if(targetElement!=null)
{s_libURL=s_js.siteLocation+'page.cfm?goAJAX=libraryEntry&rndID='+Math.random();if(targetElement.indexOf('lightbox')==0)
{JS_displayLightBox(s_libentryjs.loadingTag);}
else
{jQuery('#div_'+targetElement+'entry').html(s_libentryjs.loadingTag);}
jQuery.ajax({type:'post',url:s_libURL,data:{moduleStruct:moduleStruct},dataType:'xml',success:function(xmlDoc){if(jQuery(xmlDoc).find('redirecturl').text()!='')
{self.location=jQuery(xmlDoc).find('redirecturl').text();JS_libraryEntry_init();}
else if(targetElement.indexOf('lightbox')==0)
{JS_displayLightBox(jQuery(xmlDoc).find('entryoutput').text());JS_libraryEntry_init();JS_positionLightBox();}
else
{jQuery('#div_'+targetElement+'entry').html(jQuery(xmlDoc).find('entryoutput').text());jQuery('#div_'+targetElement+'pagenum').html(jQuery(xmlDoc).find('pagenumoutput').text());jQuery('#div_'+targetElement+'pageNum2').html(jQuery(xmlDoc).find('pagenum2output').text());jQuery('#div_libentrypagetitle').html(jQuery(xmlDoc).find('pagetitle').text());JS_closeLightBox();JS_libraryEntry_init();}},error:function(XMLHttpRequest,textStatus,errorThrown){alert(s_libURL+'&moduleStruct='+moduleStruct);alert(XMLHttpRequest.responseText);}});}}
function JS_libraryEntry_init()
{JS_applyStarRating();jQuery('.libPageNum,.libDiaryNav,.libDiaryNavSub').click(function(event){if(!event.isPropagationStopped())
{event.preventDefault();event.stopPropagation();JS_libraryEntry_load(jQuery(this).attr('targetelement'),jQuery(this).attr('jsmodule'));}});jQuery('.libentrylightbox').click(function(event){if(!event.isPropagationStopped())
{event.preventDefault();event.stopPropagation();JS_libraryEntry_load('lightbox',jQuery(this).attr('jsmodule'));}});}
function getXMLHttpObject()
{var xmlHttp=null;try
{xmlHttp=new XMLHttpRequest();}
catch(e)
{try
{xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");}
catch(e)
{try
{xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");}
catch(e)
{return false;}}}
return xmlHttp;}
function isArray(obj)
{if(obj.constructor.toString().indexOf("Array")==-1)
return false;else
return true;}
xmlHttp=new Array();function callAJAX(UID,URL,readyFunction,varOne)
{var url=URL;if(UID==0)
{UID=xmlHttp.length+10;}
else
{url+='&RNDID='+Math.random();}
xmlHttp[UID]=getXMLHttpObject();xmlHttp[UID].onreadystatechange=function()
{if(xmlHttp[UID].readyState==4&&xmlHttp[UID].status==200)
{AJAXOutput=xmlHttp[UID].responseText;AJAXreturn=xmlHttp[UID];eval(readyFunction);}}
if(isArray(URL))
{params='';ambersand='';for(i=1;i<URL.length;i++)
{URL[i]=URL[i].replace('+','%2B');params+=ambersand+encodeURI(URL[i]);ambersand='&';}
params=params.replace('%0A%5C','¦');xmlHttp[UID].open("POST",URL[0],true);xmlHttp[UID].setRequestHeader("Content-type","application/x-www-form-urlencoded");xmlHttp[UID].setRequestHeader("Content-length",params);xmlHttp[UID].setRequestHeader("Connection","close");xmlHttp[UID].send(params);}
else
{xmlHttp[UID].open("GET",encodeURI(url),true);xmlHttp[UID].send(null);}}
function formFields2Array(postArray,formname,fieldExclude)
{var theform=document.forms[formname];for(i=0;i<theform.elements.length;i++)
{if(fieldExclude.indexOf(theform.elements[i].name)==-1)
{fieldValue='';switch(theform.elements[i].tagName)
{case"INPUT":switch(theform.elements[i].type)
{case"text":case"hidden":fieldValue=encodeURIComponent(theform.elements[i].value);break;case"checkbox":if(theform.elements[i].checked)
{fieldValue=theform.elements[i].value;}
break;case"radio":if(theform.elements[i].checked)
{fieldValue=theform.elements[i].value;}}
break;case"TEXTAREA":fieldValue=encodeURIComponent(theform.elements[i].value);break;case"SELECT":var sel=theform.elements[i];if(sel.selectedIndex!=-1)
{fieldValue=sel.options[sel.selectedIndex].value;}
break;}
postArray[postArray.length]=theform.elements[i].name+"="+fieldValue;}}
return postArray;}
function evaljs(js)
{eval(js);}
function SocialBarToggle(direction)
{directionArray=direction.split(",");for(i=0;i<directionArray.length;i++)
{CurrSize=parseInt(jQuery("#social_outer").css(directionArray[i]));MinSize=parseInt(jQuery("#social_butt").css(directionArray[i]));MaxSize=parseInt(jQuery("#social_inner").css(directionArray[i]));if(CurrSize>MinSize)
{CurrSize=MinSize;}
else
{CurrSize=MaxSize;}
directionStruct={};directionStruct[directionArray[i]]=CurrSize;jQuery(document.getElementById('social_outer')).animate(directionStruct);}}
