
 /**********************************************************************************   
      *   Function Name: pickRandom
      *   Parameters: range
      *   Returns:  image links
      *   Description: To get random images
      *   Revision History:
      *   Initials                 Date              Changes
      * ---------------------------------------------------------- 
      *   Sreekumar               19/10/2005          Created
      *********************************************************************************/



    // JavaScript to interpolate random images into a page.
    var ic = 31;     // Number of alternative images
    var xoxo0 = new Array(ic);  // Array to hold filenames
	var xoxo1 = new Array(ic);
    var xoxo2 = new Array(ic);
	var xoxo3 = new Array(ic);
	var xoxo4 = new Array(ic);
	var xoxo5 = new Array(ic);
	var xoxo6 = new Array(ic);
	var xoxo7 = new Array(ic);
	var xoxo8 = new Array(ic);
        
xoxo0[0] = "images/top/maintop_01.gif";
xoxo1[0] = "images/top/maintop_02.jpg";
xoxo2[0] = "images/top/maintop_03.jpg";
xoxo3[0] = "images/top/maintop_04.jpg";
xoxo4[0] = "images/top/maintop_05.jpg";
xoxo5[0] = "images/top/maintop_06.jpg";
xoxo6[0] = "images/top/maintop_07.jpg";
xoxo7[0] = "images/top/maintop_08.jpg";
xoxo8[0] = "images/top/maintop_09.jpg";

xoxo0[1] = "images/top/meat1_01.gif";
xoxo1[1] = "images/top/meat1_02.jpg";
xoxo2[1] = "images/top/meat1_03.jpg";
xoxo3[1] = "images/top/meat1_04.jpg";
xoxo4[1] = "images/top/meat1_05.jpg";
xoxo5[1] = "images/top/meat1_06.jpg";
xoxo6[1] = "images/top/meat1_07.jpg";
xoxo7[1] = "images/top/meat1_08.jpg";
xoxo8[1] = "images/top/meat1_09.jpg";

xoxo0[2] = "images/top/meat2_01.gif";
xoxo1[2] = "images/top/meat2_02.jpg";
xoxo2[2] = "images/top/meat2_03.jpg";
xoxo3[2] = "images/top/meat2_04.jpg";
xoxo4[2] = "images/top/meat2_05.jpg";
xoxo5[2] = "images/top/meat2_06.jpg";
xoxo6[2] = "images/top/meat2_07.jpg";
xoxo7[2] = "images/top/meat2_08.jpg";
xoxo8[2] = "images/top/meat2_09.jpg";


xoxo0[3] = "images/top/meat3_01.gif";
xoxo1[3] = "images/top/meat3_02.jpg";
xoxo2[3] = "images/top/meat3_03.jpg";
xoxo3[3] = "images/top/meat3_04.jpg";
xoxo4[3] = "images/top/meat3_05.jpg";
xoxo5[3] = "images/top/meat3_06.jpg";
xoxo6[3] = "images/top/meat3_07.jpg";
xoxo7[3] = "images/top/meat3_08.jpg";
xoxo8[3] = "images/top/meat3_09.jpg";

xoxo0[4] = "images/top/meat4_01.gif";
xoxo1[4] = "images/top/meat4_02.jpg";
xoxo2[4] = "images/top/meat4_03.jpg";
xoxo3[4] = "images/top/meat4_04.jpg";
xoxo4[4] = "images/top/meat4_05.jpg";
xoxo5[4] = "images/top/meat4_06.jpg";
xoxo6[4] = "images/top/meat4_07.jpg";
xoxo7[4] = "images/top/meat4_08.jpg";
xoxo8[4] = "images/top/meat4_09.jpg";

xoxo0[5] = "images/top/meat5_01.gif";
xoxo1[5] = "images/top/meat5_02.jpg";
xoxo2[5] = "images/top/meat5_03.jpg";
xoxo3[5] = "images/top/meat5_04.jpg";
xoxo4[5] = "images/top/meat5_05.jpg";
xoxo5[5] = "images/top/meat5_06.jpg";
xoxo6[5] = "images/top/meat5_07.jpg";
xoxo7[5] = "images/top/meat5_08.jpg";
xoxo8[5] = "images/top/meat5_09.jpg";

xoxo0[6] = "images/top/poultry1_01.gif";
xoxo1[6] = "images/top/poultry1_02.jpg";
xoxo2[6] = "images/top/poultry1_03.jpg";
xoxo3[6] = "images/top/poultry1_04.jpg";
xoxo4[6] = "images/top/poultry1_05.jpg";
xoxo5[6] = "images/top/poultry1_06.jpg";
xoxo6[6] = "images/top/poultry1_07.jpg";
xoxo7[6] = "images/top/poultry1_08.jpg";
xoxo8[6] = "images/top/poultry1_09.jpg";

xoxo0[7] = "images/top/poultry2_01.gif";
xoxo1[7] = "images/top/poultry2_02.jpg";
xoxo2[7] = "images/top/poultry2_03.jpg";
xoxo3[7] = "images/top/poultry2_04.jpg";
xoxo4[7] = "images/top/poultry2_05.jpg";
xoxo5[7] = "images/top/poultry2_06.jpg";
xoxo6[7] = "images/top/poultry2_07.jpg";
xoxo7[7] = "images/top/poultry2_08.jpg";
xoxo8[7] = "images/top/poultry2_09.jpg";


xoxo0[8] = "images/top/poultry3_01.gif";
xoxo1[8] = "images/top/poultry3_02.jpg";
xoxo2[8] = "images/top/poultry3_03.jpg";
xoxo3[8] = "images/top/poultry3_04.jpg";
xoxo4[8] = "images/top/poultry3_05.jpg";
xoxo5[8] = "images/top/poultry3_06.jpg";
xoxo6[8] = "images/top/poultry3_07.jpg";
xoxo7[8] = "images/top/poultry3_08.jpg";
xoxo8[8] = "images/top/poultry3_09.jpg";

xoxo0[9] = "images/top/poultry4_01.gif";
xoxo1[9] = "images/top/poultry4_02.jpg";
xoxo2[9] = "images/top/poultry4_03.jpg";
xoxo3[9] = "images/top/poultry4_04.jpg";
xoxo4[9] = "images/top/poultry4_05.jpg";
xoxo5[9] = "images/top/poultry4_06.jpg";
xoxo6[9] = "images/top/poultry4_07.jpg";
xoxo7[9] = "images/top/poultry4_08.jpg";
xoxo8[9] = "images/top/poultry4_09.jpg";

xoxo0[10] = "images/top/poultry5_01.gif";
xoxo1[10] = "images/top/poultry5_02.jpg";
xoxo2[10] = "images/top/poultry5_03.jpg";
xoxo3[10] = "images/top/poultry5_04.jpg";
xoxo4[10] = "images/top/poultry5_05.jpg";
xoxo5[10] = "images/top/poultry5_06.jpg";
xoxo6[10] = "images/top/poultry5_07.jpg";
xoxo7[10] = "images/top/poultry5_08.jpg";
xoxo8[10] = "images/top/poultry5_09.jpg";

xoxo0[11] = "images/top/readymeal1_01.gif";
xoxo1[11] = "images/top/readymeal1_02.jpg";
xoxo2[11] = "images/top/readymeal1_03.jpg";
xoxo3[11] = "images/top/readymeal1_04.jpg";
xoxo4[11] = "images/top/readymeal1_05.jpg";
xoxo5[11] = "images/top/readymeal1_06.jpg";
xoxo6[11] = "images/top/readymeal1_07.jpg";
xoxo7[11] = "images/top/readymeal1_08.jpg";
xoxo8[11] = "images/top/readymeal1_09.jpg";

xoxo0[12] = "images/top/readymeal2_01.gif";
xoxo1[12] = "images/top/readymeal2_02.jpg";
xoxo2[12] = "images/top/readymeal2_03.jpg";
xoxo3[12] = "images/top/readymeal2_04.jpg";
xoxo4[12] = "images/top/readymeal2_05.jpg";
xoxo5[12] = "images/top/readymeal2_06.jpg";
xoxo6[12] = "images/top/readymeal2_07.jpg";
xoxo7[12] = "images/top/readymeal2_08.jpg";
xoxo8[12] = "images/top/readymeal2_09.jpg";


xoxo0[13] = "images/top/readymeal3_01.gif";
xoxo1[13] = "images/top/readymeal3_02.jpg";
xoxo2[13] = "images/top/readymeal3_03.jpg";
xoxo3[13] = "images/top/readymeal3_04.jpg";
xoxo4[13] = "images/top/readymeal3_05.jpg";
xoxo5[13] = "images/top/readymeal3_06.jpg";
xoxo6[13] = "images/top/readymeal3_07.jpg";
xoxo7[13] = "images/top/readymeal3_08.jpg";
xoxo8[13] = "images/top/readymeal3_09.jpg";

xoxo0[14] = "images/top/readymeal4_01.gif";
xoxo1[14] = "images/top/readymeal4_02.jpg";
xoxo2[14] = "images/top/readymeal4_03.jpg";
xoxo3[14] = "images/top/readymeal4_04.jpg";
xoxo4[14] = "images/top/readymeal4_05.jpg";
xoxo5[14] = "images/top/readymeal4_06.jpg";
xoxo6[14] = "images/top/readymeal4_07.jpg";
xoxo7[14] = "images/top/readymeal4_08.jpg";
xoxo8[14] = "images/top/readymeal4_09.jpg";

xoxo0[15] = "images/top/readymeal5_01.gif";
xoxo1[15] = "images/top/readymeal5_02.jpg";
xoxo2[15] = "images/top/readymeal5_03.jpg";
xoxo3[15] = "images/top/readymeal5_04.jpg";
xoxo4[15] = "images/top/readymeal5_05.jpg";
xoxo5[15] = "images/top/readymeal5_06.jpg";
xoxo6[15] = "images/top/readymeal5_07.jpg";
xoxo7[15] = "images/top/readymeal5_08.jpg";
xoxo8[15] = "images/top/readymeal5_09.jpg";

xoxo0[16] = "images/top/sea1_01.gif";
xoxo1[16] = "images/top/sea1_02.jpg";
xoxo2[16] = "images/top/sea1_03.jpg";
xoxo3[16] = "images/top/sea1_04.jpg";
xoxo4[16] = "images/top/sea1_05.jpg";
xoxo5[16] = "images/top/sea1_06.jpg";
xoxo6[16] = "images/top/sea1_07.jpg";
xoxo7[16] = "images/top/sea1_08.jpg";
xoxo8[16] = "images/top/sea1_09.jpg";

xoxo0[17] = "images/top/sea2_01.gif";
xoxo1[17] = "images/top/sea2_02.jpg";
xoxo2[17] = "images/top/sea2_03.jpg";
xoxo3[17] = "images/top/sea2_04.jpg";
xoxo4[17] = "images/top/sea2_05.jpg";
xoxo5[17] = "images/top/sea2_06.jpg";
xoxo6[17] = "images/top/sea2_07.jpg";
xoxo7[17] = "images/top/sea2_08.jpg";
xoxo8[17] = "images/top/sea2_09.jpg";


xoxo0[18] = "images/top/sea3_01.gif";
xoxo1[18] = "images/top/sea3_02.jpg";
xoxo2[18] = "images/top/sea3_03.jpg";
xoxo3[18] = "images/top/sea3_04.jpg";
xoxo4[18] = "images/top/sea3_05.jpg";
xoxo5[18] = "images/top/sea3_06.jpg";
xoxo6[18] = "images/top/sea3_07.jpg";
xoxo7[18] = "images/top/sea3_08.jpg";
xoxo8[18] = "images/top/sea3_09.jpg";

xoxo0[19] = "images/top/sea4_01.gif";
xoxo1[19] = "images/top/sea4_02.jpg";
xoxo2[19] = "images/top/sea4_03.jpg";
xoxo3[19] = "images/top/sea4_04.jpg";
xoxo4[19] = "images/top/sea4_05.jpg";
xoxo5[19] = "images/top/sea4_06.jpg";
xoxo6[19] = "images/top/sea4_07.jpg";
xoxo7[19] = "images/top/sea4_08.jpg";
xoxo8[19] = "images/top/sea4_09.jpg";

xoxo0[20] = "images/top/sea5_01.gif";
xoxo1[20] = "images/top/sea5_02.jpg";
xoxo2[20] = "images/top/sea5_03.jpg";
xoxo3[20] = "images/top/sea5_04.jpg";
xoxo4[20] = "images/top/sea5_05.jpg";
xoxo5[20] = "images/top/sea5_06.jpg";
xoxo6[20] = "images/top/sea5_07.jpg";
xoxo7[20] = "images/top/sea5_08.jpg";
xoxo8[20] = "images/top/sea5_09.jpg";

xoxo0[21] = "images/top/snacks1_01.gif";
xoxo1[21] = "images/top/snacks1_02.jpg";
xoxo2[21] = "images/top/snacks1_03.jpg";
xoxo3[21] = "images/top/snacks1_04.jpg";
xoxo4[21] = "images/top/snacks1_05.jpg";
xoxo5[21] = "images/top/snacks1_06.jpg";
xoxo6[21] = "images/top/snacks1_07.jpg";
xoxo7[21] = "images/top/snacks1_08.jpg";
xoxo8[21] = "images/top/snacks1_09.jpg";

xoxo0[22] = "images/top/snacks2_01.gif";
xoxo1[22] = "images/top/snacks2_02.jpg";
xoxo2[22] = "images/top/snacks2_03.jpg";
xoxo3[22] = "images/top/snacks2_04.jpg";
xoxo4[22] = "images/top/snacks2_05.jpg";
xoxo5[22] = "images/top/snacks2_06.jpg";
xoxo6[22] = "images/top/snacks2_07.jpg";
xoxo7[22] = "images/top/snacks2_08.jpg";
xoxo8[22] = "images/top/snacks2_09.jpg";


xoxo0[23] = "images/top/snacks3_01.gif";
xoxo1[23] = "images/top/snacks3_02.jpg";
xoxo2[23] = "images/top/snacks3_03.jpg";
xoxo3[23] = "images/top/snacks3_04.jpg";
xoxo4[23] = "images/top/snacks3_05.jpg";
xoxo5[23] = "images/top/snacks3_06.jpg";
xoxo6[23] = "images/top/snacks3_07.jpg";
xoxo7[23] = "images/top/snacks3_08.jpg";
xoxo8[23] = "images/top/snacks3_09.jpg";

xoxo0[24] = "images/top/snacks4_01.gif";
xoxo1[24] = "images/top/snacks4_02.jpg";
xoxo2[24] = "images/top/snacks4_03.jpg";
xoxo3[24] = "images/top/snacks4_04.jpg";
xoxo4[24] = "images/top/snacks4_05.jpg";
xoxo5[24] = "images/top/snacks4_06.jpg";
xoxo6[24] = "images/top/snacks4_07.jpg";
xoxo7[24] = "images/top/snacks4_08.jpg";
xoxo8[24] = "images/top/snacks4_09.jpg";

xoxo0[25] = "images/top/snacks5_01.gif";
xoxo1[25] = "images/top/snacks5_02.jpg";
xoxo2[25] = "images/top/snacks5_03.jpg";
xoxo3[25] = "images/top/snacks5_04.jpg";
xoxo4[25] = "images/top/snacks5_05.jpg";
xoxo5[25] = "images/top/snacks5_06.jpg";
xoxo6[25] = "images/top/snacks5_07.jpg";
xoxo7[25] = "images/top/snacks5_08.jpg";
xoxo8[25] = "images/top/snacks5_09.jpg";

xoxo0[26] = "images/top/veg1_01.gif";
xoxo1[26] = "images/top/veg1_02.jpg";
xoxo2[26] = "images/top/veg1_03.jpg";
xoxo3[26] = "images/top/veg1_04.jpg";
xoxo4[26] = "images/top/veg1_05.jpg";
xoxo5[26] = "images/top/veg1_06.jpg";
xoxo6[26] = "images/top/veg1_07.jpg";
xoxo7[26] = "images/top/veg1_08.jpg";
xoxo8[26] = "images/top/veg1_09.jpg";

xoxo0[27] = "images/top/veg2_01.gif";
xoxo1[27] = "images/top/veg2_02.jpg";
xoxo2[27] = "images/top/veg2_03.jpg";
xoxo3[27] = "images/top/veg2_04.jpg";
xoxo4[27] = "images/top/veg2_05.jpg";
xoxo5[27] = "images/top/veg2_06.jpg";
xoxo6[27] = "images/top/veg2_07.jpg";
xoxo7[27] = "images/top/veg2_08.jpg";
xoxo8[27] = "images/top/veg2_09.jpg";


xoxo0[28] = "images/top/veg3_01.gif";
xoxo1[28] = "images/top/veg3_02.jpg";
xoxo2[28] = "images/top/veg3_03.jpg";
xoxo3[28] = "images/top/veg3_04.jpg";
xoxo4[28] = "images/top/veg3_05.jpg";
xoxo5[28] = "images/top/veg3_06.jpg";
xoxo6[28] = "images/top/veg3_07.jpg";
xoxo7[28] = "images/top/veg3_08.jpg";
xoxo8[28] = "images/top/veg3_09.jpg";

xoxo0[29] = "images/top/veg4_01.gif";
xoxo1[29] = "images/top/veg4_02.jpg";
xoxo2[29] = "images/top/veg4_03.jpg";
xoxo3[29] = "images/top/veg4_04.jpg";
xoxo4[29] = "images/top/veg4_05.jpg";
xoxo5[29] = "images/top/veg4_06.jpg";
xoxo6[29] = "images/top/veg4_07.jpg";
xoxo7[29] = "images/top/veg4_08.jpg";
xoxo8[29] = "images/top/veg4_09.jpg";

xoxo0[30] = "images/top/veg5_01.gif";
xoxo1[30] = "images/top/veg5_02.jpg";
xoxo2[30] = "images/top/veg5_03.jpg";
xoxo3[30] = "images/top/veg5_04.jpg";
xoxo4[30] = "images/top/veg5_05.jpg";
xoxo5[30] = "images/top/veg5_06.jpg";
xoxo6[30] = "images/top/veg5_07.jpg";
xoxo7[30] = "images/top/veg5_08.jpg";
xoxo8[30] = "images/top/veg5_09.jpg";



function pickRandom(range) 
{
 if (Math.random)
   return Math.round(Math.random() * (range-1));
 else 
 {
  var now = new Date();
  return (now.getTime() / 1000) % range;
 }
}



<!--
      /**********************************************************************************   

      *   Description: The page comprises of the JavaScript code for the FPI website

      *

      *   Revision History: 

      *   Owner Initials           Date(mm/dd/yy)      Changes 

      * ----------------------------------------------------------

      *   ML                       02/03/05            Created

      *********************************************************************************/ 

var agt = navigator.userAgent.toLowerCase();
var ns6 = (!document.all && document.getElementById);
var ie5 = (agt.indexOf('msie') != -1);
var ie4 = document.all;
var ns4 = (document.layers);
var t;
var submenus = ["foodservice","retail"];
var currentStory = -1;
var currentLength = 0;
var objTicker;
var characterTimeout = 50;
var storyTimeout = 5000;
var WidgetOne = "_";
var WidgetTwo = "-";
var NoWidget = "";
var headLines = new Array();
var headLineLinks = new Array();
var objTicker;


function jsfnHighlight(obj)
{
      /**********************************************************************************   
      *   Function Name: jsfnHighlight
      *   Parameters: obj
      *   Returns: N/A
      *   Description: The function Highlights the menu link
      *   Revision History:
      *   Initials                 Date              Changes
      * ---------------------------------------------------------- 
      *   ML                       02/03/05          Created
      *********************************************************************************/
  var classString = obj.className;
  if (classString.match("ft_MtextGray")==null)	
	  obj.className = "ft_MtextH";
}



function jsfnDimMe(obj)
{
      /**********************************************************************************   
      *   Function Name: jsfnDimMe
      *   Parameters: obj
      *   Returns: N/A
      *   Description: The function dims the highlighted link
      *   Revision History:
      *   Initials                 Date              Changes
      * ---------------------------------------------------------- 
      *   ML                       02/03/05          Created
      *********************************************************************************/
  var classString = obj.className;
  if (classString.match("ft_MtextGray")==null)	
	 obj.className = "ft_Mtext";
}





function jsfnHighlightItem(item)
{
      /**********************************************************************************   
      *   Function Name: jsfnHighlight
      *   Parameters: item
      *   Returns: N/A
      *   Description: The function Highlights the menu Cell
      *   Revision History:
      *   Initials                 Date              Changes
      * ---------------------------------------------------------- 
      *   ML                       02/03/05          Created
      *********************************************************************************/
  var obj;
  obj = jsfnfindObj(item);
  obj.className = "td_popmenuH";
}


function jsfnHighlightItem1(item)
{
      /**********************************************************************************   
      *   Function Name: jsfnHighlight
      *   Parameters: item
      *   Returns: N/A
      *   Description: The function Highlights the menu Cell
      *   Revision History:
      *   Initials                 Date              Changes
      * ---------------------------------------------------------- 
      *   ML                       02/03/05          Created
      *********************************************************************************/
  var obj;
  obj = jsfnfindObj(item);
  obj.className = "td_popmenuH1";
}




function jsfnDimItem(item)
{
      /**********************************************************************************   
      *   Function Name: jsfnDimMe
      *   Parameters: obj
      *   Returns: N/A
      *   Description: The function dims the highlighted Cell
      *   Revision History:
      *   Initials                 Date              Changes
      * ---------------------------------------------------------- 
      *   ML                       02/03/05          Created
      *********************************************************************************/
  var obj;
  obj = jsfnfindObj(item);
  obj.className = "td_popmenu";
}


function jsfnDimItem1(item)
{
      /**********************************************************************************   
      *   Function Name: jsfnDimMe
      *   Parameters: obj
      *   Returns: N/A
      *   Description: The function dims the highlighted Cell
      *   Revision History:
      *   Initials                 Date              Changes
      * ---------------------------------------------------------- 
      *   ML                       02/03/05          Created
      *********************************************************************************/
  var obj;
  obj = jsfnfindObj(item);
  obj.className = "td_popmenu1";
}



function jsfnPopUp(menuid,action)
{
      /**********************************************************************************   
      *   Function Name: jsfnPopUp(id,action)
      *   Parameters: menuid = identity of the item , action=show/hide
      *   Returns: N/A
      *   Description: The function displays the popupmenu
      *   Revision History:
      *   Initials                 Date              Changes
      * ---------------------------------------------------------- 
      *   ML                       02/03/05          Created
      *********************************************************************************/
var obj,v;

v = action;
if (t) {
      clearTimeout(t);
      t = null;
}
if ((obj=jsfnfindObj(menuid))!=null)  { 
         if (obj.style) {
            obj=obj.style; 
            v=(action=='show')?'block':(action=='hide')?'none':action; 
          }
        obj.display=v; 
	}	
}




function jsfnsetTimer(menuid)
{ 
      /**********************************************************************************   
      *   Function Name: jsfnsetTimer
      *
      *   Parameters: menuid = identity of the item
      *               
      *   Returns: N/A
      *   Description: The function sets a timer to call the function to hide the item 
      *        represened by the id.
      *   Revision History:
      *   Initials                 Date              Changes
      * ---------------------------------------------------------- 
      *   ML                       02/03/05          Created
      *********************************************************************************/

 t = setTimeout("jsfnPopUp('" + menuid + "','hide')",1000);

}
function jsfnlayersCloseAll(){
      /**********************************************************************************   
      *   Function Name: jsfnlayersCloseAll
      *   Parameters: None
      *   Returns: N/A
      *   Description: The function forcibly hides all the popup submenus 
      *   Revision History:
      *   Initials                 Date              Changes
      * ---------------------------------------------------------- 
      *   ML                       02/05/05          Created
      *********************************************************************************/
for (var i=0;i < submenus.length;i++)
         jsfnPopUp(submenus[i],'hide');
}




function jsfnSubPopUp(menuid,parentid){
      /**********************************************************************************   
      *   Function Name: jsfnSubPopUp
      *   Parameters: menuid,parentid
      *   Returns: N/A
      *   Description: The function displays submenus 
      *   Revision History:
      *   Initials                 Date              Changes
      * ---------------------------------------------------------- 
      *   ML                       02/05/05          Created
      *********************************************************************************/
	if ((obj=jsfnfindObj(menuid))!=null)  { 
         if (obj.style) {
		 obj=obj.style;
		
           (obj.display=='none') ? (obj.display='block'):((obj.display=='block') ? (obj.display='none') : obj.display='block');
	}
	}
}




function jsfnfindObj(n,d) { //v4.01
      /**********************************************************************************   
      *   Function Name: jsfnfindObj
      *   Parameters: n = id, d=document object
      *   Returns:  an object 
      *   Description: The function parses thorugh all the components in the page to locate 
      * 	the object corresponding to the id given and returns it
      *   Revision History:
      *   Initials                 Date              Changes
      * ---------------------------------------------------------- 
      *   ML                       02/03/05          Created
      *********************************************************************************/	
  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&&d.layers&&i<d.layers.length;i++) 
    x=jsfnfindObj(n,d.layers[i].document);
  if(!x && d.getElementById) 
	x=d.getElementById(n); 
  return x;
}
