


function bnEmailInsert(name)
{
    var emailAddress=name+'@'+'globalprotectionsystems.com.au';
    return('<a href="mailto:'+emailAddress+'">'+emailAddress+'</a>');
}

$(document).ready(function(){
        $(".email_info").html(bnEmailInsert('info'));
});


$(document).ready(function(){
        $("#idRandA").val($("#idRandQ").val()*2+1);
});


$(window).load(function(){
                    
        if ($(window).height() > $("#idPage").height())
        {
//            $("#idPage").height($(window).height())
        }
});

function set_helper(id,string){
    if ($(id).val()==""){
        $(id).val(string);
    }
    if ($(id).val()==string){
        $(id).css("color","#CCCCCC");
    }
    $(id).focus(function(){
            if ($(id).val()==string){
                $(id).val("");
                $(id).css("color","#979797");
            }
    });
    
    $("#form1").submit(function(){
            if ($(id).val()==string){
                $(id).val("");
            }
    });
    
}

$(document).ready(function(){
        
        set_helper("#idname","Name");
        set_helper("#idphone","Phone");
        set_helper("#idemail","Email");
        set_helper("#idmessage","Message");
});






var approach_position=0;
function approach_event(){
    approach_position=approach_position+201;
    if (approach_position>800){
        approach_position=0;
    }
    $(".approach_circle").css("background-position","0px -"+approach_position+"px");
}


$(document).ready(function(){
    setInterval("approach_event()",2500);

});




