// JavaScript Document
/*var sectionA= '"'+"It always seems impossible until it's done"+'"'+". These are the words of the iconic man whose statue we surround today in celebration, appreciation and adoration. At the years close we duly show our appreciation towards Nelson Mandela for giving us the tools to become The World's Greatest but more importantly to acknowledge the contribution made by each and every hand involved in turning the dream into what has now grown into an unstoppable workforce, which moves to a proudly South African beat. The World's Greatest Dibanisa has carried the torch of the new South Africa ever since its inception in 2004.  Through love and passion of work we will strive to maintain a level of excellence in all that we do. This gathering is not only in celebration of a sound and successful financial year but in celebration of being South African in a free and Democratic society where the boundaries are non existent and opportunity is rife.";

var sectionB= "As we link together and smile for the camera, let each one of us in our hearts pay respect to a man who against the odds brought us to where we are today.";

var sectionC= "Thank you; Siyabonga; Dankie, Mr. Mandela.";

function tweentext(section,speed) {

  if (section=="A") {
    for (i=0; i<=sectionA.length; i++) {
        setTimeout("document.getElementById('writinga').innerHTML+=sectionA.substring(document.getElementById('writinga').innerHTML.length,document.getElementById('writinga').innerHTML.length+1)",(20*speed)*i);
    }
    } else 
    if (section=="B") {
    for (i=0; i<=sectionB.length; i++) {
        setTimeout("document.getElementById('writingb').innerHTML+=sectionB.substring(document.getElementById('writingb').innerHTML.length,document.getElementById('writingb').innerHTML.length+1)",(20*speed)*i);
    }
    } else 
    if (section=="C") {
    for (i=0; i<=sectionC.length; i++) {
        setTimeout("document.getElementById('writingc').innerHTML+=sectionC.substring(document.getElementById('writingc').innerHTML.length,document.getElementById('writingc').innerHTML.length+1)",(20*speed)*i);
    }
    }
}*/
function menubuttonover(id) {
    menu_btn=document.getElementById("menu" + id);
    var imgsource=menu_btn.src;
    menu_btn.src=imgsource.replace(/_up.bmp/,"_ov.bmp");
}
function menubuttonout(id) {
    menu_btn=document.getElementById("menu" + id);
    var imgsource=menu_btn.src;
    menu_btn.src=imgsource.replace(/_ov.bmp/,"_up.bmp");
}
function altcss(theClass,element,value) {
theClass=theClass.toLowerCase();
var doc_stext;
	 var cssRules;
	 if (document.all) {
	  cssRules = 'rules';
	 }
	 else if (document.getElementById) {
	  cssRules = 'cssRules';
	 }
	 for (var S = 0; S < document.styleSheets.length; S++){
	  for (var R = 0; R < document.styleSheets[S][cssRules].length; R++) {
	  stext=document.styleSheets[S][cssRules][R].selectorText.toLowerCase();
	   if (stext == theClass) {
	    document.styleSheets[S][cssRules][R].style[element] = value;
	    
	   }
	  }
	 }
}
function obs_DoFSCommand(command, args) {
  var obsObj = InternetExplorer ? obs : document.obs;
  var drumzObj = InternetExplorer ? drumz : document.drumz;
  var coinzObj = InternetExplorer ? coinz : document.coinz;
  if (command=="showbtns") {
  drumzObj.Play();
  coinzObj.Play();
  }
}
function preloadimgs(page,showprogress) {
pic = new Array();
    pic[1]= "img/products/panel.bmp";
    pic[2]= "img/products/strike.bmp";
    pic[3]= "img/products/header.jpg";
    pic[4]= "img/white.bmp";
if (page=="offices") {
    pic[5]=  "img/offices/o1_sr1_ov.jpg"; 
    pic[6]=  "img/offices/o1_sr1_down.jpg";
    pic[7]=  "img/offices/o1_sr2_ov.jpg";
    pic[8]=  "img/offices/o1_sr2_down.jpg";
    pic[9]=  "img/offices/o1_sr3_ov.jpg";
    pic[10]= "img/offices/o1_sr3_down.jpg";
    pic[11]= "img/offices/o1_sr4_ov.jpg";
    pic[12]= "img/offices/o1_sr4_down.jpg";
    pic[13]= "img/offices/o1_sr5_ov.jpg";
    pic[14]= "img/offices/o1_sr5_down.jpg";
    pic[15]= "img/offices/o1_sr6_ov.jpg";
    pic[16]= "img/offices/o1_sr6_down.jpg";
    pic[17]= "img/offices/o1_sr7_ov.jpg";
    pic[18]= "img/offices/o1_sr7_down.jpg";
    pic[19]= "img/offices/o2_sr1_ov.jpg";
    pic[20]= "img/offices/o2_sr1_down.jpg";
    pic[21]= "img/offices/o2_sr2_ov.jpg";
    pic[22]= "img/offices/o2_sr2_down.jpg";
    pic[23]= "img/offices/o1_sr1_up.jpg";
    pic[24]= "img/offices/o1_sr2_up.jpg";
    pic[25]= "img/offices/o1_sr3_up.jpg";
    pic[26]= "img/offices/o1_sr4_up.jpg";
    pic[27]= "img/offices/o1_sr5_up.jpg";
    pic[28]= "img/offices/o1_sr6_up.jpg";
    pic[29]= "img/offices/o1_sr7_up.jpg";
    pic[30]= "img/offices/o2_sr1_up.jpg";
    pic[31]= "img/offices/o2_sr2_up.jpg";
} else if (page=="info") {
    pic[5]=  "img/buttons/info/company_info_up.png";
    pic[6]=  "img/buttons/info/company_info_ov.png";
    pic[7]=  "img/buttons/info/company_info_do.png";
    pic[8]=  "img/buttons/info/sales_up.png";
    pic[9]=  "img/buttons/info/sales_ov.png";
    pic[10]= "img/buttons/info/sales_do.png";
    pic[11]= "img/buttons/info/pik_up.png";
    pic[12]= "img/buttons/info/pik_ov.png";
    pic[13]= "img/buttons/info/pik_do.png";
    pic[14]= "img/buttons/info/team_up.png";
    pic[15]= "img/buttons/info/team_ov.png";
    pic[16]= "img/buttons/info/team_do.png";
    pic[17]= "img/buttons/info/charter_up.png";
    pic[18]= "img/buttons/info/charter_ov.png";
    pic[19]= "img/buttons/info/charter_do.png";
    pic[20]= "img/buttons/info/back_home_up.png";
    pic[21]= "img/buttons/info/back_home_ov.png";
    pic[22]= "img/buttons/info/back_home_do.png";
} else if (page=="products") {
    pic[5]=  "img/buttons/back_up.png";
    pic[6]=  "img/buttons/back_ov.png";
    pic[7]=  "img/buttons/back_do.png";
    pic[8]=  "img/buttons/pns/web_up.png";
    pic[9]=  "img/buttons/pns/web_ov.png";
    pic[10]= "img/buttons/pns/web_do.png";
    pic[11]= "img/buttons/pns/station_up.png";
    pic[12]= "img/buttons/pns/station_ov.png";
    pic[13]= "img/buttons/pns/station_do.png";
    pic[14]= "img/buttons/pns/rubber_up.png";
    pic[15]= "img/buttons/pns/rubber_ov.png";
    pic[16]= "img/buttons/pns/rubber_do.png";
    pic[17]= "img/buttons/pns/print_up.png";
    pic[18]= "img/buttons/pns/print_ov.png";
    pic[19]= "img/buttons/pns/print_do.png";
    pic[20]= "img/buttons/pns/justick_up.png";
    pic[21]= "img/buttons/pns/justick_ov.png";
    pic[22]= "img/buttons/pns/justick_do.png";
    pic[23]= "img/buttons/pns/it_up.png";
    pic[24]= "img/buttons/pns/it_ov.png";
    pic[25]= "img/buttons/pns/it_do.png";
    pic[26]= "img/buttons/pns/bcards_up.png";
    pic[27]= "img/buttons/pns/bcards_ov.png";
    pic[28]= "img/buttons/pns/bcards_do.png";
}
var imsource;
var imcount=pic.length-1;
var imloaded=0;
var percentdone=0;
  for (i in pic) {
    imsource=pic[i];
    pic[i]= new Image;
    pic[i].src=imsource;
    if (showprogress) {
        if (pic[i].complete) {
        imloaded++;
            percentdone=Math.round((imloaded/imcount)*100);
            document.getElementById('percent').innerHTML=percentdone;
            altcss("#bar","width",parseInt(((percentdone/100)*180)/6)*6+'px');
            if (imloaded==imcount) {
                  altcss("#imgloader","display","none");
                  altcss(".imgloadedcontent","display","block");
                  }
        } else {
        pic[i].onload = function() {
            imloaded++;
            percentdone=Math.round((imloaded/imcount)*100);
            document.getElementById('percent').innerHTML=percentdone;
            altcss("#bar","width",parseInt(((percentdone/100)*180)/6)*6+'px');
            if (imloaded==imcount) {
                  altcss("#imgloader","display","none");
                  altcss(".imgloadedcontent","display","block");
                  }
            }
        }
    }
  }
}
