﻿            function editCSS(cssClassName,toChange,changeTo){
                for(i = 0; document.styleSheets.length > i; i++){ //Mozilla
                    if(document.styleSheets[i].rules != undefined){
                           for(j = 0; document.styleSheets[i].rules.length > j; j++){
                                if(document.styleSheets[i].rules[j].selectorText.toLowerCase() == cssClassName){
                                    document.styleSheets[i].rules[j].style[toChange] = changeTo;
                                }
                           } 
                     }else if(document.styleSheets[i].cssRules != undefined){ //IE
                           for(j = 0; document.styleSheets[i].cssRules.length > j; j++){
                                if(document.styleSheets[i].cssRules[j].selectorText.toLowerCase() == cssClassName){
                                     document.styleSheets[i].cssRules[j].style[toChange] = changeTo;               
                                }
                           }
                     }else{
                        window.alert("Your browser are not fully supported, FreelanceZone.com.sg is designed to best fit IE and Firefox.");
                     }
                }
            }
            editCSS('.news_style','display','none');                        
            editCSS('.js_hidden_div','display','none');
            
            jQuery(document).ready(function(){                
                var slogunoption = {
                  firstname: "flzslogun",
                  secondname: "slogunhere",
                  //thirdname:"news_display",
                  fourthname:"slogun_button",
                  imagedir:"images/newsSlider/",     
                  //nexttitle:"Next News:",
                  //prevtitle:"Prev News:",
                  disablenewscount:true
                }
                $.init_news(slogunoption);                 
            });
            jQuery(document).ready(function(){                
                var tipsoption = {
                  firstname: "flzTips",
                  secondname: "tipshere",
                  //thirdname:"news_display",
                  fourthname:"tips_button",
                  imagedir:"images/newsSlider/",     
                  //nexttitle:"Next News:",
                  //prevtitle:"Prev News:",
                  disablenewscount:true
                }
                $.init_news(tipsoption);                 
            });
            var evt;
            if(navigator.appVersion.indexOf('MSIE') < 0){
                HTMLElement.prototype.click = function() {
                    evt = this.ownerDocument.createEvent('MouseEvents');
                    evt.initMouseEvent('click', true, true, this.ownerDocument.defaultView, 1, 0, 0, 0, 0, false, false, false, false, 0, null);
                    this.dispatchEvent(evt);
                }
            }
            var component;
            function tagSwitch(which,command){
                component = document.getElementById(which);
                if(which!="lbl_2"){
                    document.getElementById("lbl_2").style.fontSize="10pt";
                }
                if("on"==command){
                    component.style.fontSize="14pt";                    
                }else{
                    component.style.fontSize="10pt";                    
                }
            }