function AddPopUp(fileName,height,width){
	var windowprops="height=" + height + ",width=" + width + ",location=no,scrollbars=yes,"
	+ "menubars=no,toolbars=no,resizable=yes,titlebar=no";
	var URL=fileName;
	popup=window.open(URL,"MenuPopup",windowprops);
}
function isEmpty(str)
{
	var i;
	var len;
	len = str.length;
	for(i=0; i<str.length && str.charAt(i)==' '; i++);
	if(i==len)
	   return true;
	return false;
}
function isNumeric(str)
{
  for (var i=0; i < str.length; i++)
		{
    var ch = str.substring(i, i+1)
    if( ch < "0" || ch>"9" || str.length == null)
    {
      return false
    }
  }
  return true
}	


 function setzindex(element, effect)
 {
	
	if (effect[0].effect.direction == 1)
	{
	element.style.zIndex=zindexStart;
	
		//seems that IE needs a seperate solution
		if(/MSIE 6.0/.test(navigator.userAgent) && /Windows NT 5.1/.test(navigator.userAgent))
		{
				Spry.Effect.setStyleProp(	element.parentNode, 'zIndex', zindexStart);
				//element.parentNode.style.zIndex = zindexStart;
		}

	}
	zindexStart++;
 }


 function resetzindex(element, effect)
 {
	if (effect[0].effect.direction == 2)
	{
 		 element.style.zIndex=1;
		
		if(/MSIE 6.0/.test(navigator.userAgent) && /Windows NT 5.1/.test(navigator.userAgent))
		 {
			Spry.Effect.setStyleProp(	element.parentNode, 'zIndex', 1);
		 }
	}
	
}

function toggleThumb(targetElement)
{
	Spry.Effect.GrowShrink(targetElement, {duration: 400, from: '100%', to: '150%', toggle: true, setup:setzindex, finish:resetzindex});
}
