
$(function(){$(".MegaMenuLink").megamenu(".MegaMenuContent");$('#MegaMenuContent').css("text-align","left");$("h1").css("z-index",1);$(".sIFR-flash").css("z-index",1);$(".MegaMenu").css("z-index",1000);$(".call_link").simpletooltip();});function focusSearch(object){if($(object).val()=="Search"){$(object).val('');}}
function blurSearch(object){if($(object).val()==""){$(object).val('Search');}}
function focusSignup(object){if($(object).val()=="Your Email"){$(object).val('');}}
function blurSignup(object){if($(object).val()==""){$(object).val('Your Email');}}
var prev_feature=0;function showFeature(feature,name){$('#cur_section').text('Feature: '+name);$('#product_content').hide("slow");$('#product_content').html($('#feature_'+feature).html());$('#product_content').show("slow");$('#back_option').show();}
function showOverview(){$('#cur_section').text('Overview');$('#product_content').hide("slow");$('#product_content').html($('#overview').html());$('#product_content').show("slow");$('#back_option').hide();}
function changeMarketSegment(object,segment,title,image,url){$('#segment_img').attr('src',image);$('#segment_img').attr('alt',title);$('#segment_img').attr('title',title);$('#segment_links div').removeClass("selected");$(object).addClass("selected");$('#solutionType').val(url);$('#marketplace_span').text(segment);}
function findSolution(){$('#solutionForm').submit();}
function goto(url){location.href=url;}
function changeVideoChapter(chapter){if(isNaN(chapter)){$('#video_area').html("<p>Invalid video selection</p>");return;}
$('#video_area').html("<p>Loading Video...</p>"+'<p><img src="/images/ajax-loader.gif" width="16" height="11"></p>');$.post("/include/site_ajax.php","ChangeChapter=true&chapter="+chapter,function(data){$("#video_area").html(data);$("[id^='menu_opt']").removeClass("selected");$("#menu_opt_"+chapter).addClass("selected");});}

function doSearch(search)
{
    if(search == "" || search == undefined)
        return;                                         

    location.href = '/Search/?s=' + escape(search);
}

function changeHardware() {
    location.href = '/CompatibleHardware.php?'
                        + 'category=' + $("#category").val()
                        + '&version=' + $("#version").val();
}
    

function getHardwareDetails(hwID)
{   
    var tosend = "getHardwareDetails=true&hwID=" + hwID;  
                                  
    $.post("/include/downloads_fnc.php", tosend, 
        function(data) { 
            if(data.indexOf("<!--ERROR-->") > -1) {
                $("#hardware_popup").html(''); 
                $("#hardware_popup").dialog( "close" );
            }
            else {                             
                $("#hardware_popup").html(data); 
                $("#hardware_popup").dialog( "open" );
            }
        });
}

function printHardware()
{                                                                                        
    window.open('/include/PrintHardware.php?hwID=' + $("#currentHardware").val(),'mywindow','width=700,height=350')
}
