// JavaScript Document
function toggleLayer(whichLayer) {
  var elem, vis;
  if(document.getElementById) // this is the way the standards work
    elem = document.getElementById(whichLayer);
  else if(document.all) // this is the way old msie versions work
      elem = document.all[whichLayer];
  else if(document.layers) // this is the way nn4 works
    elem = document.layers[whichLayer];
  vis = elem.style;
  // if the style.display value is blank we try to figure it out here
  if(vis.display==''&&elem.offsetWidth!=undefined&&elem.offsetHeight!=undefined)
    vis.display = (elem.offsetWidth!=0&&elem.offsetHeight!=0)?'block':'none';
  vis.display = (vis.display==''||vis.display=='block')?'none':'block';
}
	
//radio button function for ratings buttons	
/*function onReload(pawsphoto, val)
{

for(var i=0; i < document.form1.type.length; i++){
if(document.form1.type[i].checked);
var val=document.form1.type[i].value;
}

self.location="dog-photo-gallery/?photo="+pawsphoto+"&paws="+val;

}
*/
//rollover functions
function doc_onmouseover(id, img2) {
	document.images[id].src=img2;
	
	}
function doc_onmouseout(id, img1) {
	document.images[id].src=img1;
	}

//rollover image functions - I think these are used for taf
/*function mover(id, img2) {
	document.images[class].src=img2;
	
	}
function mout(id, img1) {
	document.images[class].src=img1;
	}
*/

function commentOver(elem) {
	elem.src = 'http://www.adoglikeyou.com/images/button_tailWaggerOver.png';
}
function commentOut(elem) {
	elem.src = 'http://www.adoglikeyou.com/images/button_tailWagger_35.png';
}

function commentOver2(elem) {
	elem.src = '../images/button_blogComOver.png';
   
}
function commentOut2(elem) {
	 elem.src = '../images/button_blogCom.png';
}

function commentHPover(elem) {
	elem.src = 'images/button_tailWaggerOver.png';
}
function commentHPout(elem) {
	elem.src = 'images/button_tailWagger_35.png';
}

function blogRateOver(elem) {
	elem.src = '../images/button_blogPost2_over.png';
}
function blogRate(elem) {
	elem.src = '../images/button_blogPost2.png';
}

function addRateButton_over(elem) {
	elem.src = 'http://www.adoglikeyou.com/images/button_the_over.png';
}
function addRateButton_out(elem) {
	elem.src='http://www.adoglikeyou.com/images/button_the.png';
}



//onChange function for select box - select & go automatically
function changePage(newLoc)
	{
		nextPage = newLoc.options[newLoc.selectedIndex].value
		
		if (nextPage != "")
			{
				document.location.href = nextPage
			}
	}


