home *** CD-ROM | disk | FTP | other *** search
- function infobar(title,text,color,button,img){
- var infobar_color = document.getElementById('infobar_color');
- var infobar_img = document.getElementById('infobar_img');
-
- if (color == 'green') {
- infobar_color.style.backgroundImage = "url(./tools/ico/infobar/green.png)";
- infobar_img.src = "./tools/ico/infobar/greenImg.png";
- infobar_color.style.backgroundColor = "#c4fb9c";
- }
- else if (color == 'yelow') {
- infobar_color.style.backgroundImage = "url(./tools/ico/infobar/yelow.png)";
- infobar_img.src = "./tools/ico/infobar/yelowImg.png";
- infobar_color.style.backgroundColor = "#ffda75";
- }
- else if (color == 'red') {
- infobar_color.style.backgroundImage = "url(./tools/ico/infobar/red.png)";
- infobar_img.src = "./tools/ico/infobar/redImg.png";
- infobar_color.style.backgroundColor = "#ff7575";
- }
-
- text += '<br><LABEL style="float:left; margin:5px; margin-left:0px; font-size:11px;"><input type="checkbox" name="hideDetail" id="hideDetail" value="a2" onclick="hideDetails(this.checked)"' + (document.getElementById('drv_lists').style.display=='none'?' checked':'') + '> '+infobar_hideDetails+'</LABEL>';
-
- if (button == 'InstAll')
- text += "<button class='infobar_button' onclick='chkManual(\"driver_available\"); facebox_dialog();'>"+infobar_buttonInstAll+"</button>";
- if (button == 'UpdAll')
- text += "<button class='infobar_button' onclick='chkManual(\"driver_new\"); facebox_dialog();'>"+infobar_buttonUpdAll+"</button>";
- if (img)
- infobar_img.src = "./tools/ico/infobar/"+img+".png";
-
- document.getElementById('infobar_title').innerHTML = title;
- document.getElementById('infobar_info').innerHTML = text;
- }
-
- function chkManual(div){
- ClearChk();
- for (var i = 0; i < buttonCount; i++) {
- var checkbox = document.getElementById('chk'+i);
- var divname = document.getElementById('type'+i).value;
-
- if (divname == div) { checkbox.checked="true"; ChangeChkCount(1); }
- else { checkbox.checked=""; }
- }
- }
-
- function infobar_update(){
- if (doc_num['driver_available'] > 0) {
- infobar_drvAvailable();
- }
- else if (doc_num['no_driver'] > 0) {
- infobar_drvNone();
- }
- else if (doc_num['driver_new'] > 0) {
- infobar_drvNew();
- }
- else {
- infobar_drvAllOk();
- }
- }
-
- function infobar_drvAvailable(){
- infobar(
- infobar_titleDriverAvailable,
- '<b>'+doc_num['driver_available']+'</b> - '+morfolog('infobar_infoDriverAvailable',doc_num['driver_available']),
- 'red',
- 'InstAll'
- );
- if (doc_num['driver_available']==0) infobar_drvAllOk();
- setTab('tab-install');
- }
- function infobar_drvNew(){
- infobar(
- infobar_titleDriverNew,
- '<b>'+doc_num['driver_new']+'</b> - '+morfolog('infobar_infoDriverNew',doc_num['driver_new']),
- 'yelow',
- 'UpdAll'
- );
- if (doc_num['driver_new']==0) {
- infobar(
- infobar_titleAllUpd,
- infobar_infoAllUpd,
- 'green'
- );
- setTimeout("document.getElementById('infobar_img').src = './tools/ico/infobar/update.png';",0);
- }
- setTab('tab-update');
- }
- function infobar_drvNone(){
- infobar(
- infobar_titleNoDriver,
- '<b>'+doc_num['no_driver']+'</b> - '+morfolog('infobar_infoNoDriver',doc_num['no_driver'])+infobar_urls,
- 'red'
- );
- if (doc_num['no_driver']==0) infobar_drvAllOk();
- setTab('tab-search');
- modeTab('tab-search');
- }
- function infobar_drvAllOk(){
- infobar(
- infobar_titleAllInst,
- infobar_infoAllInst,
- 'green'
- );
- setTab('tab-install');
- }
-
-
-
- function infobar_loading(){
- infobar(
- infobar_titleLoading,
- infobar_infoLoading,
- 'yelow',
- '',
- 'loading'
- );
- }
-
- infobar_update();
-
-
- function setTab(tab){
- document.getElementById('tab-install').setAttribute('className','');
- document.getElementById('tab-update').setAttribute('className','');
- document.getElementById('tab-search').setAttribute('className','');
-
- if (tab) document.getElementById(tab).setAttribute('className','active');
- }
- function modeTab(tab,mode){
- mode = mode || '';
- if (tab) document.getElementById(tab).style.visibility=mode;
- }
-