//if (self.parent.frames.length != 0){
  //  self.parent.location="http://www.freelancezone.com.sg/";
//}

var tmpcookie = new Date();
chkcookie = (tmpcookie.getTime() + '');
document.cookie = "chkcookie=" + chkcookie + "; path=/";
if (document.cookie.indexOf(chkcookie,0) < 0) {
  alert('Your browser cookies is not enabled.\n We need cookies to store your member authentication.')
}


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:"http://img.freelancezone.com.sg/newsSlider/",
      //effectis : '1',
      newsspeed:'10000',
      //nexttitle:"Next News:",
      //prevtitle:"Prev News:",
      mouseover:false,
      effectspeed:'2000',
      disablenewscount:true
    }
    $.init_news(slogunoption);
});
jQuery(document).ready(function(){
    var tipsoption = {
      firstname: "flzTips",
      secondname: "tipshere",
      //thirdname:"news_display",
      fourthname:"tips_button",
      imagedir:"http://img.freelancezone.com.sg/newsSlider/",
      //nexttitle:"Next News:",
      //prevtitle:"Prev News:",
      disablenewscount:true
    }
    $.init_news(tipsoption);
});
var evt;
if(navigator.appVersion.indexOf("MSIE")<0){//not IE browser
    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";
    }
}

function clearbox () {
    var username = document.getElementById("usernameTxt");
    var password = document.getElementById("password");
    document.getElementById("usernameTxt").style.color ="black";
    document.getElementById("passwordTxt").style.color ="black";
    if(username.value=="<Login Id>" ){
        document.getElementById("usernameTxt").value ="";
        document.getElementById("password").value ="";
        document.getElementById("passwordTxt").value ="";
        document.getElementById("passwordTxt").style.display ="block";
        document.getElementById("password").style.display ="none";
    }
    if(password.value=="<Password>") {
        document.getElementById("password").value ="";
        document.getElementById("passwordTxt").value ="";
        document.getElementById("passwordTxt").style.display ="block";
        document.getElementById("password").style.display ="none";
    }

}
function returnbox() {
    var username = document.getElementById("usernameTxt");
    var password = document.getElementById("passwordTxt");
    if(username.value=="" && password.value==""){
        document.getElementById("usernameTxt").value ="<Login Id>";
        //document.getElementById("passwordTxt").value ="<Password>";
        document.getElementById("password").value ="<Password>";
        document.getElementById("password").style.color ="#BABABA";
        //document.getElementById("passwordTxt").style.color ="#BABABA";
        document.getElementById("usernameTxt").style.color ="#BABABA";
        document.getElementById("passwordTxt").style.display ="none";
        document.getElementById("password").style.display ="block";
        
        
    } else
    {
        document.getElementById("passwordTxt").style.display ="block";
        document.getElementById("password").style.display ="none";
    }
}
function forgotenPassword(){
    if(document.getElementById("sendEmail").style.visibility=="hidden")
    {

    document.getElementById("sendEmail").style.visibility ="visible";
    document.getElementById("space").style.visibility ="hidden";
    }
    else
    {
        document.getElementById("sendEmail").style.visibility ="hidden";
        document.getElementById("space").style.visibility ="visible";
    }
}
function lemmein() {
alert(window.event.keyCode);
if (window.event.keyCode==13) {
document.getElementById("SignInForm").submit();
}else{
    return false;
}

}

  function humanToTime()
  {
    var humDate = new Date(Date.UTC(document.h2u.inYear.value,
          (stripLeadingZeroes(document.h2u.inMon.value)-1),
          stripLeadingZeroes(document.h2u.inDay.value),
          stripLeadingZeroes(document.h2u.inHr.value),
          stripLeadingZeroes(document.h2u.inMin.value),
          stripLeadingZeroes(document.h2u.inSec.value)));
    document.h2u.result.value = (humDate.getTime()/1000.0);
  }

  function stripLeadingZeroes(input)
  {
    if((input.length > 1) && (input.substr(0,1) == "0"))
      return input.substr(1);
    else
      return input;
  }
//  End -->

