﻿function toggle_it(itemID,lab) {
    // Toggle visibility between none and inline 
    if ((document.getElementById(itemID).style.display == 'none')) {
        document.getElementById('1').style.display = 'none';
        document.getElementById('2').style.display = 'none';
        //document.getElementById('3').style.display = 'none';
      //  document.getElementById('4').style.display = 'none';

        document.getElementById(itemID).style.display = 'inline';
        document.getElementById('2').style.display = 'inline';
       // document.getElementById('3').style.display = 'inline';
    //    document.getElementById('4').style.display = 'inline';
        
      
         if(document.getElementById('ctl00_ContentPlaceHolder1_pnlScroll')!=null)
        {
        
        document.getElementById('ctl00_ContentPlaceHolder1_pnlScroll').style.height = '308px';
        }
         if(document.getElementById('ctl00_ContentPlaceHolder1_ConfpnlScroll')!=null)
        {
        document.getElementById('ctl00_ContentPlaceHolder1_ConfpnlScroll').style.height = '308px';
        }
        
         if(document.getElementById('ctl00_ContentPlaceHolder1_pnlScrollbasket')!=null)
        {
        document.getElementById('ctl00_ContentPlaceHolder1_pnlScrollbasket').style.height = '320px';
        }
        document.getElementById(lab).innerHTML = 'Hide Header';
    } else {

        document.getElementById(itemID).style.display = 'none';
        document.getElementById('2').style.display = 'none';
       // document.getElementById('3').style.display = 'none';
     //   document.getElementById('4').style.display = 'none';
        document.getElementById(lab).innerHTML = 'Show Header';
        if(document.getElementById('ctl00_ContentPlaceHolder1_pnlScroll')!=null)
        {
          document.getElementById('ctl00_ContentPlaceHolder1_pnlScroll').style.height = '450px';
        }
         if(document.getElementById('ctl00_ContentPlaceHolder1_pnlScrollbasket')!=null)
        {
        document.getElementById('ctl00_ContentPlaceHolder1_pnlScrollbasket').style.height = '450px';
        }
        if(document.getElementById('ctl00_ContentPlaceHolder1_ConfpnlScroll')!=null)
        {
        document.getElementById('ctl00_ContentPlaceHolder1_ConfpnlScroll').style.height = '450px';
        }
    }
}


function hide() {
    document.getElementById('1').style.display = 'inline';
    document.getElementById('2').style.display = 'inline';
   // document.getElementById('3').style.display = 'inline';
 //  document.getElementById('4').style.display = 'inline';

}



function MM_findObj(n, d) { //v4.01
    var p, i, x; if (!d) d = document; if ((p = n.indexOf("?")) > 0 && parent.frames.length) {
        d = parent.frames[n.substring(p + 1)].document; n = n.substring(0, p);
    }
    if (!(x = d[n]) && d.all) x = d.all[n]; for (i = 0; !x && i < d.forms.length; i++) x = d.forms[i][n];
    for (i = 0; !x && d.layers && i < d.layers.length; i++) x = MM_findObj(n, d.layers[i].document);
    if (!x && d.getElementById) x = d.getElementById(n); return x;
}

function MM_showHideLayers() { //v6.0
    var i, p, v, obj, args = MM_showHideLayers.arguments;
    for (i = 0; i < (args.length - 2); i += 3) if ((obj = MM_findObj(args[i])) != null) {
        v = args[i + 2];
        if (obj.style) { obj = obj.style; v = (v == 'show') ? 'visible' : (v == 'hide') ? 'hidden' : v; }
        obj.visibility = v;
    }
}


function ShowPopup_Diamond( ) {
    var alttext = "true";
     var objDiv = document.getElementById('divToolTip');
      objDiv.style.display = 'block';
    ContentText = "<table width='250' border='0' cellpadding='0' cellspacing='0'>";
    ContentText += "<tr>";
    ContentText += "<td width='6%' rowspan='2' valign='top' background='../images/width_pop/left.png'><img src='../images/width_pop/espace.png' width='18' height='10' /></td>";
    ContentText += "<td height='37' background='../images/width_pop/top2.png'></td>";
    ContentText += "<td width='2%' rowspan='2' background='../images/width_pop/right.png'><img src='../images/width_pop/espace.png' width='33' height='70' /></td>";
    ContentText += "</tr>";
    ContentText += "<tr>";
    ContentText += "<td width='92%' valign='top' bgcolor='#FFFFFF'><table width='100%' cellspacing='0' cellpadding='0'>";
    ContentText += "<tr>";
    ContentText += "<td height='130' valign='top' bgcolor='#FFFFFF'><table width='95%' border='0' align='center' cellpadding='0' cellspacing='0'>";
    ContentText += "<tr>";
    ContentText += "<td></td>";
    ContentText += "<td colspan='3'>&nbsp;</td>";
    ContentText += "</tr>";
    ContentText += "<tr>";
    ContentText += "<td>&nbsp;</td>";
    ContentText += "<td colspan='2' class='pd_details_tit'>Diamond Information</td>";
    ContentText += "</tr>";
    ContentText += "<tr>";
    ContentText += "<td>&nbsp;</td>";
    ContentText += "<td colspan='2'></td>";
    ContentText += "</tr>";
  
        ContentText += "<td width='8%'>&nbsp;</td>";
        ContentText += "<td width='48%'>Stock #: </td>";
        ContentText += "<td> RoundColur </td>";
        ContentText += "</tr>";

 
 
        ContentText += "<td>&nbsp;</td>";
        ContentText += "<td>Shape: </td>";
        ContentText += "<td> Round </td>";
        ContentText += "</tr>";

  
//    if (fltCarat.toString() != "" && fltCarat.toString() != "%") {

//        if (alttext.toString() == "true") {
//            ContentText += "<tr class='pd_text_alt'>";
//            alttext = "false";
//        }
//        else {
//            ContentText += "<tr class='pd_text_alt1'>";
//            alttext = "true";
//        }
//        ContentText += "<td>&nbsp;</td>";
//        ContentText += "<td >Carat: </td>";
//        ContentText += "<td>" + fltCarat + "</td>";
//        ContentText += "</tr>";

//    }
//    if (txtColor.toString() != "" && txtColor.toString() != "%") {

//        if (alttext.toString() == "true") {
//            ContentText += "<tr class='pd_text_alt'>";
//            alttext = "false";
//        }
//        else {
//            ContentText += "<tr class='pd_text_alt1'>";
//            alttext = "true";
//        }
//        ContentText += "<td >&nbsp;</td>";
//        ContentText += "<td >Color:</td>";
//        ContentText += "<td>" + txtColor + "</td>";
//        ContentText += "</tr>";
//    }
//    if (strCutGrade.toString() != "" && strCutGrade.toString() != "%") {

//        if (alttext.toString() == "true") {
//            ContentText += "<tr class='pd_text_alt'>";
//            alttext = "false";
//        }
//        else {
//            ContentText += "<tr class='pd_text_alt1'>";
//            alttext = "true";
//        }
//        ContentText += "<td >&nbsp;</td>";
//        ContentText += "<td >Cut Grade:</td>";
//        ContentText += "<td>" + strCutGrade + "</td>";
//        ContentText += "</tr>";
//    }
//    if (txtClarity.toString() != "" && txtClarity.toString() != "%") {

//        if (alttext.toString() == "true") {
//            ContentText += "<tr class='pd_text_alt'>";
//            alttext = "false";
//        }
//        else {
//            ContentText += "<tr class='pd_text_alt1'>";
//            alttext = "true";
//        }
//        ContentText += "<td>&nbsp;</td>";
//        ContentText += "<td>Clarity: </td>";
//        ContentText += "<td>" + txtClarity + "</td>";
//        ContentText += "</tr>";

//    }
//    if (fltPrice.toString() != "" && fltPrice.toString() != "%") {

//        if (alttext.toString() == "true") {
//            ContentText += "<tr class='pd_text_alt'>";
//            alttext = "false";
//        }
//        else {
//            ContentText += "<tr class='pd_text_alt1'>";
//            alttext = "true";
//        }
//        ContentText += "<td>&nbsp;</td>";
//        ContentText += "<td>Price: </td>";
//        ContentText += "<td>" + (PriceDisabled.toString() == "0" ? fltPrice : "&nbsp;") + "</td>";
//        ContentText += "</tr>";


//    }
//    if (fltDepth.toString() != "" && fltDepth.toString() != "%") {
//        if (alttext.toString() == "true") {
//            ContentText += "<tr class='pd_text_alt'>";
//            alttext = "false";
//        }
//        else {
//            ContentText += "<tr class='pd_text_alt1'>";
//            alttext = "true";
//        }
//        ContentText += "<td>&nbsp;</td>";
//        ContentText += "<td>Depth: </td>";
//        ContentText += "<td>" + fltDepth + "</td>";
//        ContentText += "</tr>";


//    }
//    if (fltTable.toString() != "" && fltTable.toString() != "%") {
//        if (alttext.toString() == "true") {
//            ContentText += "<tr class='pd_text_alt'>";
//            alttext = "false";
//        }
//        else {
//            ContentText += "<tr class='pd_text_alt1'>";
//            alttext = "true";
//        }
//        ContentText += "<td>&nbsp;</td>";
//        ContentText += "<td>Table: </td>";
//        ContentText += "<td>" + fltTable + "</td>";
//        ContentText += "</tr>";


//    }
//    if (txtPolish.toString() != "" && txtPolish.toString() != "%") {

//        if (alttext.toString() == "true") {
//            ContentText += "<tr class='pd_text_alt'>";
//            alttext = "false";
//        }
//        else {
//            ContentText += "<tr class='pd_text_alt1'>";
//            alttext = "true";
//        }
//        ContentText += "<td>&nbsp;</td>";
//        ContentText += "<td>Polish: </td>";
//        ContentText += "<td>" + txtPolish + "</td>";
//        ContentText += "</tr>";

//    }
//    if (txtSymmetry.toString() != "" && txtSymmetry.toString() != "%") {

//        if (alttext.toString() == "true") {
//            ContentText += "<tr class='pd_text_alt'>";
//            alttext = "false";
//        }
//        else {
//            ContentText += "<tr class='pd_text_alt1'>";
//            alttext = "true";
//        }
//        ContentText += "<td>&nbsp;</td>";
//        ContentText += "<td>Symmetry: </td>";
//        ContentText += "<td>" + txtSymmetry + "</td>";
//        ContentText += "</tr>";

//    }
//    if (txtFluorescence.toString() != "" && txtFluorescence.toString() != "%") {
//        if (alttext.toString() == "true") {
//            ContentText += "<tr class='pd_text_alt'>";
//            alttext = "false";
//        }
//        else {
//            ContentText += "<tr class='pd_text_alt1'>";
//            alttext = "true";
//        }
//        ContentText += "<td>&nbsp;</td>";
//        ContentText += "<td>Fluorescence: </td>";
//        ContentText += "<td>" + txtFluorescence + "</td>";
//        ContentText += "</tr>";


//    }
//    if (fltCrown.toString() != "" && fltCrown.toString() != "%") {

//        if (alttext.toString() == "true") {
//            ContentText += "<tr class='pd_text_alt'>";
//            alttext = "false";
//        }
//        else {
//            ContentText += "<tr class='pd_text_alt1'>";
//            alttext = "true";
//        }
//        ContentText += "<td>&nbsp;</td>";
//        ContentText += "<td>Crown: </td>";
//        ContentText += "<td>" + fltCrown + "</td>";
//        ContentText += "</tr>";

//    }
//    if (txtMeasurements.toString() != "" && txtMeasurements.toString() != "%") {
//        if (alttext.toString() == "true") {
//            ContentText += "<tr class='pd_text_alt'>";
//            alttext = "false";
//        }
//        else {
//            ContentText += "<tr class='pd_text_alt1'>";
//            alttext = "true";
//        }
//        ContentText += "<td>&nbsp;</td>";
//        ContentText += "<td>Measurements: </td>";
//        ContentText += "<td>" + txtMeasurements + "</td>";
//        ContentText += "</tr>";

//    }
//    ContentText += "<tr>";
//    ContentText += "<td colspan='3'>&nbsp;</td>";
//    ContentText += "</tr>";
//    if (DealerId != "863" && DealerId != "") {
//        ContentText += "<tr>";
//        ContentText += "<td class='pd_details_tit'>&nbsp;</td>";
//        ContentText += "<td colspan='2' class='pd_details_tit'>SEE IT FIRST AT </td>";
//        ContentText += "</tr>";
//        ContentText += "<tr>";
//        ContentText += "<td class='pd_text_alt1'>&nbsp;</td>";
//        ContentText += "<td colspan='2' class='pd_text_alt1'>" + DealerCompany + "</strong><br />" + DealerAddress + "<br/>" + DealerPhone + "</td>";
//        ContentText += "</tr>";
//    }
    ContentText += "</table></td>";
    ContentText += "</tr>";
    ContentText += "</table></td>";
    ContentText += "</tr>";
    ContentText += "<tr>";
    ContentText += "<td colspan='2' valign='top' background='../images/width_pop/e.png'><img src='../images/width_pop/espace.png' width='33' height='41' /></td>";
    ContentText += "<td background='../images/width_pop/bright.png'></td>";
    ContentText += "</tr>";
    ContentText += "</table>";

    document.getElementById("divToolTip").innerHTML = ContentText;
   // ShowToolTip_Diamond('divToolTip');
}
function ShowToolTip_Diamond(TDiv) {
    var objDiv = document.getElementById(TDiv);
   // var objRow = objTR;
    objDiv.style.display = 'none';
//    var yPos = getAbsTop(objRow) - 100;
//    var xPos = getAbsLeft(objRow) - 232;
//    objDiv.style.left = xPos + 'px';
//    objDiv.style.top = yPos + 'px';
}

function HidePopup_Diamond() {
    document.getElementById("divToolTip").style.display = "none";
}


var __isIE =  navigator.appVersion.match(/MSIE/);
var __userAgent = navigator.userAgent;
var __isFireFox = __userAgent.match(/firefox/i);
var __isFireFoxOld = __isFireFox && (__userAgent.match(/firefox\/2./i) || __userAgent.match(/firefox\/1./i));
var __isChrome = __userAgent.match(/chrome/i);
var __isFireFoxNew = __isFireFox && !__isFireFoxOld ;

/*alert(__isFireFox);
alert(__isFireFoxOld);

alert(__isFireFoxNew);
alert(__isChrome);
*/


