﻿
//var _gaq = _gaq || [];
//_gaq.push(['_setAccount', 'UA-18971610-1']);
//_gaq.push(['_trackPageview']);

//(function() {
//    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
//    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
//    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
//})();


  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-18971610-2']);
  _gaq.push(['_trackPageview']);
  _gaq.push(['_trackPageLoadTime']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();





function OpenWindow(URL) {

    window.open(URL);
}
function OpenWindow2(URL) {

    window.open(URL, '', 'status=no');
    
}

function makeAJAXPostback() {

    $(document).ready
    {
        var foo = [];
        $('#s5 :selected').each(function(i, selected) {

            foo[i] = $(selected).val();
        });

        document.forms[0].hidTDClickID.value = foo;
        document.forms[0].btnTDClicked.click();
    };

}

// Formats the text that is shown in the control 
//_formatText: function(selectOptions, firstItemChecksAll, allSelected) {
//    var text;
//    if (firstItemChecksAll && allSelected) {
//        // just set the text from the first item 
//        text = selectOptions.filter(":first").text();
//    } else {
//        // concatenate the text from the checked items 
//        text = "";
//        selectOptions.each(function() {
//            if ($(this).attr("selected")) {
//                text += $(this).text() + ", ";
//            }
//        });
//        if (text.length > 0) {
//            text = text.substring(0, text.length - 2);
//        }
//    }
//    return "Manufacturer";
//}

function CheckKeywordLength() {
   
    if (document.getElementById('ctl00_txtSearch').value.length < 3) {
        alert('Keyword must contain at least 3 characters');
        return false;
    }
    return true;
}
function FloatMenuHover() {
    var animationSpeed = 3000;
    var animationEasing = 'easeOutQuint';
    var scrollAmount = $(document).scrollTop();
    var newPosition = -284;
    $('#chatslider').stop().animate({ 'margin-left': newPosition }, animationSpeed, animationEasing);
}

function FloatMenuLeave() {
    var animationSpeed = 3000;
    var animationEasing = 'easeOutQuint';
    var scrollAmount = $(document).scrollTop();
    var newPosition = -35;
    $('#chatslider').stop().animate({ 'margin-left': newPosition }, animationSpeed, animationEasing);
}


   


