// JavaScript Document
//onload this function will set the height of the div in which text will increase the given height of the div and it is also checked in IE 6

function setDivHeight(divId)
{

	arr=$$('*').filterByClass('product_details');
	arr_div=$$('*').filterByClass('product_details_content');

var browserName=navigator.appName; 
var browserVersion=parseInt(navigator.appVersion); 

	c=1;
	for(i=0; i<arr_div.length; i++)
	{
		str=arr_div[i].id;
		str_arr=str.split('_'); 		
					//setting div height for the selected div
						if(divId==arr_div[i].id )
						{
								document.getElementById(divId).style.display='block';
								document.getElementById('product_title_'+str_arr[1]).style.height=165+'px'; 
								document.getElementById('product_title_'+str_arr[1]).style.paddingTop=10+'px';
								document.getElementById(divId).innerHTML+='<p>'+"&nbsp;&nbsp;"+'</p>';
						}
						else
						{
						document.getElementById(arr_div[i].id).style.display='none';
						document.getElementById('product_title_'+str_arr[1]).style.paddingTop=0+'px';
						document.getElementById('product_title_'+str_arr[1]).style.height=40+'px';
						}
						c++;
				}	


}

var LastOpenedDiv = "";
	function displayimg(fieldName)
		{
			if(document.getElementById(fieldName).style.display == "block")
			{
			document.getElementById(fieldName).style.display ="none";
			}
			else if(LastOpenedDiv != "")
			{
			document.getElementById(LastOpenedDiv).style.display ="none";
			document.getElementById(fieldName).style.display ="block";
			LastOpenedDiv = fieldName;
			}
			else
			{
			document.getElementById(fieldName).style.display ="block";
			LastOpenedDiv = fieldName;
			}
		}


