

<!---
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

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_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
currentProd = "";

function rateProduct(theMark){
for(i=1;i<6;i++){
if(i!=theMark){MM_swapImage('mark'+i,'','images/mark_'+i+'.gif',1)}
}
document.getElementById("theRate").value = theMark;
currentProd = theMark;
}
function checkProduct(theMark){
if(theMark!=currentProd){
MM_swapImgRestore();
} else if(currentProd==""){
MM_swapImgRestore();
}
}

//function openAZ(whichOne){
//myCheck = document.getElementById("content_"+whichOne).style.display;
//if(myCheck=="none" || myCheck==""){
//document.getElementById("content_"+whichOne).style.display = "inline";
//document.getElementById("hold_"+whichOne).className="azListOff";
//} else {
//document.getElementById("content_"+whichOne).style.display = "none";
//document.getElementById("hold_"+whichOne).className="azListOn";
//}

//}

//function showEvent(whichOne){
//myCheck = document.getElementById(whichOne).style.display;
//if(myCheck=="none" || myCheck==""){
//document.getElementById(whichOne).style.display = "inline";
//} else {
//document.getElementById(whichOne).style.display = "none";
//}
//}

//function openEvent(theURL) { 
//  myWindow = window.open(theURL,'popper','resizable=yes,width=530,height=500,scrollbars=yes');
//  myWindow.focus();
//}

function submitVac(doWhich) { 
switch(doWhich){
case 0:
document.getElementById('toolResults').style.display = "none";
break;
case 1:
document.getElementById('toolResults').style.display = "inline";
calcim();
break;
}
}


function submitDueDate(doWhich) { 
switch(doWhich){
case 0:
document.getElementById('toolResults').style.display = "none";
break;
case 1:
document.getElementById('toolResults').style.display = "inline";
break;
}
}


function submitOvulation(doWhich) { 
switch(doWhich){
case 0:
document.getElementById('toolResults').style.display = "none";
break;
case 1:
document.getElementById('toolResults').style.display = "inline";
break;
}
}



/////////////////////////////// nav /////////////////////////////////////
function createNav(){

theMarker = '';
theSubMarker = ' ';
//topNav = new Array();

//topNav[0] = new Array();
//topNav[0][0] = new Array("Getting Pregnant","hub.html",1);
//topNav[0][1] = new Array();
//topNav[0][1][0] = new Array("Sub nav one","hub_sub.html",10);
//topNav[0][1][1] = new Array("Sub nav one","hub_sub.html",11);
//topNav[0][1][2] = new Array("Sub nav one","hub_sub.html",12);
//topNav[0][1][3] = new Array("Sub nav one","hub_sub.html",13);
//topNav[0][1][4] = new Array("Sub nav one","hub_sub.html",14);

//topNav[1] = new Array();
//topNav[1][0] = new Array("Pregnancy","hub.html",2);
//topNav[1][1] = new Array();
//topNav[1][1][0] = new Array("Sub nav one","hub_sub.html",21);
//topNav[1][1][1] = new Array("Sub nav one","hub_sub.html",22);
//topNav[1][1][2] = new Array("Sub nav one","hub_sub.html",23);

//topNav[2] = new Array();
//topNav[2][0] = new Array("Baby","hub.html",3);
//topNav[2][1] = new Array();
//topNav[2][1][0] = new Array("Sub nav one","hub_sub.html",31);
//topNav[2][1][1] = new Array("Sub nav one","hub_sub.html",32);

//topNav[3] = new Array();
//topNav[3][0] = new Array("Toddler 2-4 ","hub.html",4);
//topNav[3][1] = new Array();
//topNav[3][1][0] = new Array("Sub nav one","hub_sub.html",41);
//topNav[3][1][1] = new Array("Sub nav one","hub_sub.html",42);

//topNav[4] = new Array();
//topNav[4][0] = new Array("Preschool 4-6  ","hub.html",5);
//topNav[4][1] = new Array();
//topNav[4][1][0] = new Array("Sub nav one","hub_sub.html",51);
//topNav[4][1][1] = new Array("Sub nav one","hub_sub.html",52);

//topNav[5] = new Array();
//topNav[5][0] = new Array("School 6-12","hub.html",6);
//topNav[5][1] = new Array();
//topNav[5][1][0] = new Array("Sub nav one","hub_sub.html",61);
//topNav[5][1][1] = new Array("Sub nav one","hub_sub.html",62);
//topNav[5][1][2] = new Array("Sub nav one","hub_sub.html",63);
//topNav[5][1][3] = new Array("Sub nav one","hub_sub.html",64);

//topNav[6] = new Array();
//topNav[6][0] = new Array("Teens   12-18","hub.html",7);
//topNav[6][1] = new Array();
//topNav[6][1][0] = new Array("Sub nav one","hub_sub.html",71);
//topNav[6][1][1] = new Array("Sub nav one","hub_sub.html",72);

//topNav[7] = new Array();
//topNav[7][0] = new Array("Experts","hub.html",8);
//topNav[7][1] = new Array();
//topNav[7][1][0] = new Array("Sub nav one","hub_sub.html",81);
//topNav[7][1][1] = new Array("Sub nav one","hub_sub.html",82);
//topNav[7][1][2] = new Array("Sub nav one","hub_sub.html",83);

//topNav[8] = new Array();
//topNav[8][0] = new Array("My Kids","hub.html",9);
//topNav[8][1] = new Array();
//topNav[8][1][0] = new Array("Sub nav one","hub_sub.html",91);


//-->
//////////////////////////////////////////// write nav
myNav = "";
/////////////////write main nav
mySub="";

for(i=0;i<topNav.length;i++){
    myNav+="<a href=\""+topNav[i][0][1]+"\" onMouseOver=\"showSub("+topNav[i][0][2]+");\" onMouseOut=\"checkState();\"  id=\"top_"+topNav[i][0][2]+"\">"+topNav[i][0][0]+"</a>"
    if(i!=topNav.length-1){myNav+="<p></p>"}
/////////////////write sub nav
        mySub += "<div id=\"subNav"+topNav[i][0][2]+"\" style=\"display:none;\">";
        
        var url = window.location.href;
        var indexOfLastSlash = url.lastIndexOf("/");
        var toMatch = topNav[i][0][1];
        
        while (indexOfLastSlash != -1)
        {
                  if (url.toLowerCase() == toMatch.toLowerCase())
                  {
                        theMarker = topNav[i][0][2];
                        break;  
                 }
                 if (indexOfLastSlash != 0 ) 
                 {
                        url = url.substring(0, indexOfLastSlash);
                        if (url.toLowerCase() ==  toMatch.toLowerCase())
                        {
                            theMarker = topNav[i][0][2];
                            break;  
                        }
                        else
                        {                         
                           indexOfLastSlash = url.lastIndexOf("/");
                       }
                }
        }
        
        
//        if (window.location == topNav[i][0][1])
//            theMarker = topNav[i][0][2];
        
        for(a=0;a<topNav[i][1].length;a++){
            mySub+="<a href=\""+topNav[i][1][a][1]+"\" onMouseOver=\"clearOut();\" onMouseOut=\"checkState();\"  id=\"sub_"+topNav[i][1][a][2]+"\">"+topNav[i][1][a][0]+"</a>"
            if(a!=topNav[i][1].length-1){mySub+="<p></p>"}
            
             var insideUrl = window.location.href;
             var indexOfLastSlash = insideUrl.lastIndexOf("/");
             var insideToMatch =  topNav[i][1][a][1];
             while (indexOfLastSlash != -1)
            {
                  if (insideUrl.toLowerCase() == insideToMatch.toLowerCase())
                  {
                       theMarker = topNav[i][0][2];
                       theSubMarker = topNav[i][1][a][2]
                        break;  
                 }
                if (indexOfLastSlash != 0 ) {
                        insideUrl = insideUrl.substring(0, indexOfLastSlash);
                        
                        if (insideUrl.toLowerCase() == insideToMatch.toLowerCase())
                        {
                             theMarker = topNav[i][0][2];
                             theSubMarker = topNav[i][1][a][2]
                              break;  
                        }
                        else
                        {                         
                           indexOfLastSlash = insideUrl.lastIndexOf("/");
                       }
                }
        }
            
//            if (window.location == topNav[i][1][a][1]) {
//                theMarker = topNav[i][0][2];
//                theSubMarker = topNav[i][1][a][2];  
//            }    
        }
        mySub += "</div>";
}

    document.getElementById("mainNav").innerHTML=myNav;
    document.getElementById("sNav").innerHTML=mySub;
    
    if (!isNaN(parseInt(theMarker))) //if the marker DOES parse as an INT then it's NOT the home category and the id is a valid number so set the menu and submenu
    {
         setMainStyle(theMarker,theSubMarker);
         showSub(theMarker);
    }

}
////////////////////////////////////////// end write nav
mynavTime = "";

function showSub(tSub){
    for(i=0;i<topNav.length;i++)
    {
          document.getElementById("top_"+topNav[i][0][2]).className = "offNav";
    }
    clearInterval(mynavTime);
    hideSubs()
    
    if((theSubMarker=="") || (theSubMarker==undefined)) 
    {}
    else{
    document.getElementById("subNav"+tSub).style.display = "inline";
    }
    
    document.getElementById("top_"+tSub).className = "hightLightNav";
}

function clearSub(){
  if (isNaN(parseInt(theMarker))) //if the marker DOES NOT parse to an INT then it means it's on the home category..hide submenus
  {
      hideSubs();
  } 
  else 
  {
     showSub(theMarker);
     setMainStyle(theMarker,theSubMarker);
  }
   clearInterval(mynavTime);
}

function checkState(){
    mynavTime = setInterval(clearSub,1000);
}

function setMainStyle(theID,theSubID){
      document.getElementById("top_"+theID).className = "hightLightNav";
      
       if((theSubMarker=="") || (theSubMarker==" ") || (theSubMarker==undefined))
      {
       }
       else{
        document.getElementById("sub_"+theSubID).className = "hightLightSub";
        document.getElementById("subNav"+theID).style.display = "inline";
    }
}


function hideSubs(){
for(i=0;i<topNav.length;i++){
document.getElementById("subNav"+topNav[i][0][2]).style.display = "none";
document.getElementById("top_"+topNav[i][0][2]).className = "offNav";
}
}

function clearOut(){
clearInterval(mynavTime);
}

////////////////////////////////////////////////////////////// scrollbars////////////////////////////////////////////////////////
/////////------------------- start scrolly  -----------------------------/////////////////////////////
///////// scripted by overactive //////////////////////////////////////////////////////////////////////////////
//ssmyArray = new Array(200,200,400,200,400,200)
ssarrayNum = "";
ssCurrentPos = 0;//position of content
ssSpeed = 50;//speed of movement
ssMoveme = "";//interval
ssAutoMoveme = "";//interval
ssTotal="";//total width
ssEnd=0;

/////////////////////////////////// eased moving  /////////////////////////////////////////////////////////////
function ssmoveScroll(ssDir){
ssMoveAmount = (ssEnd-ssCurrentPos)/3;
if((ssCurrentPos<ssEnd+2)&&(ssCurrentPos>ssEnd-2)){
// cleartimeout
ssCurrentPos = ssEnd;clearInterval(ssMoveme);
}else {
ssCurrentPos=Math.round(ssCurrentPos+ssMoveAmount);
}
document.getElementById("scrollMover").style.left =ssCurrentPos+"px";
}
/////////////////////////////////// pause it  /////////////////////////////////////////////////////////////
function ssPause() {
clearInterval(ssAutoMoveme);
//clearInterval(ssMoveme);
}
/////////////////////////////////// move next  /////////////////////////////////////////////////////////////
function ssNext() {
clearInterval(ssAutoMoveme);
clearInterval(ssMoveme);
ssEnd-=ssMoveAmt;
//if((ssEnd+(ssMoveAmt-20))<=(sstotalWidth-ssTotal)){ssEnd=0}
if((ssEnd-(ssMoveAmt))<=(sstotalWidth-ssTotal)){ssEnd+=ssMoveAmt;}else{
writeIt("total"+ssTotal+"end"+ssEnd+"move amount"+ssMoveAmt+"/")
ssMoveme = setInterval("ssmoveScroll(1)",ssSpeed);
}
}
/////////////////////////////////// move next  /////////////////////////////////////////////////////////////
function ssNextAuto() {
clearInterval(ssMoveme);
ssEnd-=ssMoveAmt;
if((ssEnd+((ssMoveAmt)))<=(sstotalWidth-ssTotal)){ssEnd=0}
writeIt("total"+ssTotal+"end"+ssEnd+"move amount"+ssMoveAmt+"/")
ssMoveme = setInterval("ssmoveScroll(1)",ssSpeed);
}
/////////////////////////////////// move back  /////////////////////////////////////////////////////////////
function ssPrev() {
clearInterval(ssAutoMoveme);
clearInterval(ssMoveme);
ssEnd+=ssMoveAmt;
//if(ssEnd>=(ssMoveAmt-20)){ssEnd=sstotalWidth-ssTotal+20}
if(ssEnd>=(ssMoveAmt-20)){ssEnd-=ssMoveAmt;} else {
writeIt("total"+ssTotal+"end"+ssEnd+"move amount"+ssMoveAmt+"/")
ssMoveme = setInterval("ssmoveScroll(0)",ssSpeed);
}
}
/////////////////////////////////// total width  /////////////////////////////////////////////////////////////
function writeIt(thetxt){
//document.getElementById("writ").innerHTML = thetxt;
}

function ssCalcWidth() {
sstotalWidth = Number(ss_holderwidth);//width of holder
ssMoveAmt = Number(ss_movewidth);// move amount
sstheNum=0;
//for(i=0;i<ssmyArray.length;i++){sstheNum+=ssmyArray[i];}
for(i=0;i<ss_numarticles+1;i++){sstheNum+=ss_movewidth;} 
ssTotal=sstheNum;
document.getElementById("scrollMover").style.width = ssTotal+"px";
// ssautoMove();
}
/////////////////////////////////// automove  /////////////////////////////////////////////////////////////
function ssautoMove(){
ssAutoMoveme =  setInterval("ssNextAuto()",10000);
}

/////////------------------ end scrolly  -------------------////////////////////////////////////


///////////////////////////////////// gallery scripts ////////////////////////////////////////////////////

function showImage(imgNum){
document.getElementById('ulGalleryImageViewer').innerHTML = "<img src='"+pImages[imgNum][0]+"'>";

currentNum = imgNum;
}

//function showNext(){
//if((currentNum+1)==totalNum){currentNum=0} else {currentNum++;}
//showImage(currentNum);
//}

//function showPrev(){
//if((currentNum-1)<0){currentNum=totalNum-1} else {currentNum--;}
//showImage(currentNum);
//}

function initiateGal(){
totalPages = Math.ceil(totalNum/thumsPerPage);
remainder = totalNum-(totalPages*thumsPerPage)
currentPage = 0;
showImage(0);

}


//function setThumbs(){
//  
//    
//   
//    start = (currentPage*thumsPerPage)

//    if(currentPage==(totalPages-1)){theTotal=thumsPerPage+((currentPage*thumsPerPage)+remainder)} else {theTotal=thumsPerPage+(currentPage*thumsPerPage)}
//        myWriteThumb = "";
//        
//    for(i=start;i<theTotal;i++){
//        if(pImages[i][2]!=undefined){myWriteThumb += "<a href='javascript:showImage("+i+");'><img src='"+pImages[i][2]+"' border='0'></a>";}
//    }
//    document.getElementById('theThumbs').innerHTML = myWriteThumb;
//    document.getElementById('theNums').innerHTML = "Page "+(currentPage+1)+" of "+totalPages;    
//    if(totalPages <= 1)
//        document.getElementById('thumbnailPager').style. visibility = 'hidden';     
//    
//}

//function galNext(which){

//    switch(which){
//        case 0:
//            currentPage--;
//            if(currentPage < 0)
//                {currentPage = 0;}
//        break;
//        case 1:
//            currentPage++;            
//            if(currentPage >= totalPages-1)
//                {currentPage=totalPages-1;}
//            break;
//    }
//    setThumbs();
//}
/////////////////////////////////////////////////////////////////////////////////////////////////
