var widgets = {'eur':{} , 'usd':{} , 'aud':{}, 'cad':{}, 'chf':{}, 'cny':{}, 'gbp':{} , 'inr':{} , 'jpy':{}}; widgets.eur = { '1month':'gswlgeuroo30dayau.php', '1year':'gswlgeuroo180dayau.php', '5year':'xau-eur-5year.png', '10year':'xau-eur-10year.png' } widgets.usd = { '1month':'xau-usd-1month.png', '1year':'xau-usd-1year.png', '5year':'xau-usd-5year.png', '10year':'xau-usd-10year.png' } function gbGetWidget(curr,weight,period,metal) { var month="border:0px;"; var day="border:0px;"; var fday="border:0px;"; var smon="border:0px;"; var tyr="border:0px;"; var fyr="border:0px;"; var oz="border:0px;"; var g="border:0px;"; var kg="border:0px;"; var teyr="border:0px;"; var max="border:0px;"; if(period=='30day') {month='background-color:#666666'; } else if(period=='1day') {day='background-color:#666666'; } else if(period=='5day') { fday='background-color:#666666'; } else if(period=='180day') { smon='background-color:#666666';} else if(period=='2yr') {tyr='background-color:#666666'; } else if(period=='5yr') { fyr='background-color:#666666';} else if(period=='10yr') { teyr='background-color:#666666';} else if(period=='max') { max='background-color:#666666';} if(weight=='o') {oz='background-color:#666666'; } else if(weight=='g') {g='background-color:#666666'; } else if(weight=='k') { kg='background-color:#666666'; } if (curr=='eur') var selecteur = ' selected '; if (curr=='aud') var selectaud = ' selected '; if (curr=='cad') var selectcad = ' selected '; if (curr=='cny') var selectcny = ' selected '; if (curr=='chf') var selectchf = ' selected '; if (curr=='usd') var selectusd = ' selected '; if (curr=='gbp') var selectgbp = ' selected '; if (curr=='inr') var selectinr = ' selected '; if (curr=='jpy') var selectjpy = ' selected '; if (metal=='au') var selectau = ' selected '; if (metal=='ag') var selectag = ' selected '; if (metal=='pa') var selectpa = ' selected '; if (metal=='pl') var selectpl = ' selected '; var rnum = Math.random().toString(); document.getElementById('gbWidgetChartHisto').innerHTML = ('
'+ '
'+ '
'+ 'Change currency   '+ '
'+ '
'+ ''+ '
'+ '
'+ '24h   '+ '5d   '+ '1m   '+ '6m   '+ '2y   '+ '5y   '+ '10y   '+ 'max
  '+ '
'+ '
'+ 'oz   '+ 'g   '+ 'kg   
'+ '
'+ '
'+ '
'); } var cont= "usd"; document.write('
'); gbGetWidget(cont,'o','30day');