defaultReturnPeriod = 4//CUSTOMISE THIS:::::::::Note 5
graphAreaOffsetY = -60 //Note 6
isGraphDivRelative = true //Note 1
lineThicknessX = 1
lineThicknessY = 2
toolTipsMovingBoundedMethod = 1


toolTipsMovingMethod = 1

if(document.layers && isGraphDivRelative){
  nsAndRelative = true//leave this one.
  nsRelGraphDivToDocX = 37//Note 2
  nsRelGraphDivToDocY = 30
}
function ggPageOnload(){
  setComparisonsSelected()
  setDateRange()
}

function setComparisonsSelected(){
  if(comparisonsParam.indexOf('MID_250@IT') != -1){document.chartForm.comparisonINDEX.checked = true}
  if(comparisonsParam.indexOf('43@GRP') != -1){document.chartForm.comparisonSECTOR.checked = true}
  
}
function getComparisons(){
  var comparisons = "";
  if(document.chartForm.comparisonINDEX.checked == true){comparisons += document.chartForm.comparisonINDEX.value}
  if(document.chartForm.comparisonSECTOR.checked == true){if(comparisons != ""){comparisons += ","} comparisons += document.chartForm.comparisonSECTOR.value}
  
  if(comparisons != ""){comparisons = '&comparisons=' + comparisons}
  return comparisons
}


///TOOLTIPS.
tooltipsHTMLBefore = '<table width="1" border="0" cellspacing="0" cellpadding="1" style="font-family: Verdana, Arial, sans-serif; font-size:10px; background-color: #ccff99; color: #06ba39; font-weight:bold; padding: 0; margin: 0; border: 1px solid #06ba39;"><tr><td><nobr>'
tooltipsHTMLAfter = '<span id="tooltipsDivWidthFinder" style="position:relative; left:0px; top:0px; width:0px; height:0px; z-index:5; visibility:visible;"></span></nobr></td></tr></table></td></tr></table>'
tooltipsHTMLLineBefore = ''
tooltipsHTMLLineAfter = ''

if(document.layers){
  tooltipsStaticHTMLBefore = '<font style="font-family: Verdana, Arial, sans-serif; font-size:10px; background-color: #ccff99; color: #06ba39; font-weight:bold; border-right:1px solid #06ba39;">'
  tooltipsStaticHTMLAfter = '</font>'
} else {
  tooltipsStaticHTMLBefore = ''
  tooltipsStaticHTMLAfter = ''
}



function detachGraph(popupWidth,popupHeight){
  detachedChartWin = this.open(chartSrc, 'detachedChartWindow', 'toolbar=yes,menubar=yes,width='+popupWidth+',height='+popupHeight+',location=no,scrollbars=yes,resizable=no,status=no,left=100,top=100');
}

function goToGraphURL(newURL){
  self.location.href = newURL;
}



//firefox hover prices

function setDivProperty(divId,propertyName,valueSetTo){//IE5/6 IE4  NS6/7 NS4
  if(propertyName == 'left'){
    containerDivOffSetXY = getContainerDivOffSet()
    valueSetTo -= containerDivOffSetXY[0]
  } else if(propertyName == 'top'){
    containerDivOffSetXY = getContainerDivOffSet()
    valueSetTo -= containerDivOffSetXY[1]
  }
  
  if(document.getElementById){
    if(divId == 'tooltipsLineDiv') {
      eval('document.getElementById(tooltipsLineDivVar).style.' + propertyName + '= "' + valueSetTo + '"')
    } else {
      eval('document.getElementById(divId).style.' + propertyName + '= "' + valueSetTo + '"')
        if(propertyName == 'left'){
                                   document.getElementById(tooltipsDivVar).style.left = valueSetTo+'px';
                                  }
        if(propertyName == 'top'){
                                   document.getElementById(tooltipsDivVar).style.top = valueSetTo+'px';
                                  }                                  
      //alert(propertyName +'  '+valueSetTo)
      //alert('top:'+document.getElementById('tooltipsDiv').style.top+'   left:'+document.getElementById('tooltipsDiv').style.left)
    }    
  } else if(document.all){
    eval('document.all(divId).style.' + propertyName + '= "' + valueSetTo + '"')
  } else if (document.layers){
    propertyName = propertyNameNS(propertyName)//for differing names
    valueSetTo = valueSetToNS(valueSetTo)//for differing names
    eval('document.' + divId + '.' + propertyName + '= "' + valueSetTo + '"')
  }
}