function fnOpenAll(x)
 {
       var d,url;
			 x = str_replace(x," ","%20");
			 url = "sapi/indexer.php?folder="+x;
			 d = window.open(url,'Productslist', 'toolbar=no,scrollbars=yes,height=400,width=700');
		    d.moveBy(0,0);
  }

	function fnOpenPhoto(x)
	{
    if (document.all)
		  {
		    window.showModalDialog("cc/"+x);
			}
	  else 
		 {	
		  var d = window.open("cc/"+x,'ProductsImages', 'scrollbars=yes,height=550,width=600');
      d.moveBy(30,0);
		 }	
	}

function fnOpenURL(x)
 {
				var d = window.open(x,'ChildBrowser', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,copyhistory=no,height=400,width=700');
		    d.moveBy(30,70);
  }
	
function str_replace(incomingText,x,y)
	{
		workString=incomingText;
		str1 = x;
		str2 = y;
		while (workString.indexOf(str1)!=-1)
		{
			workString=workString.substring(0,workString.indexOf(str1))+str2+workString.substring(workString.indexOf(str1)+str1.length,workString.length);
		}
		return (workString);
	}
