﻿/* for use within the haworth.com Product section */

function checkOverViewText(){
        var ovcHeight = $("#overViewContent").height();
        var ovpHeight = $("#overViewPod").height();

        //alert($("#overViewContent").height()+ " ovp:" +$("#overViewPod").height());
        if(ovcHeight < ovpHeight){
            $("#readmore").html("");
        }
}


function ht_showMore(divID, contentID, aID){
    
    var colHeight = $("#"+divID).height();
    
    var exHeight = $("#"+contentID).height()+10;
    
    //alert($("#"+contentID).height());
    $("#"+divID).animate({height:exHeight},750);
    $("#"+aID).html("<a href=\"javascript:showLess(\'"+divID+"\' , \'"+contentID+"\',\'"+aID+"\',"+colHeight+")\">less</a>");
}

function showLess(divID, contentID, aID, colHeight){
    //alert("in: " +divID);
    //var colHeight = $("#"+divID).innerHeight();
    $("#"+divID).animate({height:colHeight}, 750);
    $("#"+aID).html("<a href=\"javascript:ht_showMore(\'"+divID+"\' ,\'"+contentID+"\', \'"+aID+"\')\">more</a>");
}

function showSpecificSeat(divID){

    $(".productSortDiv").fadeOut(750);
    if(!divID==""){
        $("#"+divID).fadeIn(750);
    }else{
        $(".productSortDiv").fadeIn(750);
    }
    
}


function expandSubDiv(subDiv,plusDiv){
   
    if($("#"+subDiv).css("display")=="block"){
        $("#"+subDiv).css("display","none").hide();
        $("#"+plusDiv).html("+");
    }else{
        $("#"+subDiv).css("display","block").show();
        $("#"+plusDiv).html("-");
    }   
}
