function stock_message(pItem)
{
var str_stock = '';
if(pItem > 1)
str_stock = 'In Stock';
return str_stock;
}
function set_load_flag()
{
load_flag = 1;
return;
}
function SectionList(names, URLs)
{
var strIDs = '';
var str_url = '';
for (var i=1; i <= names.length; i++) {
if (names[i].pChild) {
if (names[i].pChild[1].sName.search(/\s*page\s*\d/gi) != -1)
str_url = URLs[i].pChild[1].sURL;
else
str_url = URLs[i].sURL;  
}
else
str_url = URLs[i].sURL;  
strIDs += '<tr onmouseover=\"this.bgColor=\'#F7941D\';\" onmouseout=\"this.bgColor=\'#3333FF\';\" vAlign=top><td class=secs><a class=secs href='
+ str_url + '>' + names[i].sName.replace(/ /g, "&nbsp;") + '&nbsp;<img class=secs src=\"spacer.gif\" width=170 height=17 border=0></a></td></tr>';
}
return strIDs
}
function SecPath(names, URLs)
{
var str_path = '';
if (sec4)
if (names[sec1].pChild[sec2].pChild[sec3].pChild[sec4].sName.search(/\s*page\s*\d/gi) == -1)
str_path = '<a href=\"' +  URLs[sec1].sURL + '\">' +  names[sec1].sName + '</a> &#62 '
+ '<a href=\"' +  URLs[sec1].pChild[sec2].sURL + '\">' +  names[sec1].pChild[sec2].sName + '</a> &#62 '
+ '<a href=\"' +  URLs[sec1].pChild[sec2].pChild[sec3].sURL + '\">' +  names[sec1].pChild[sec2].pChild[sec3].sName + '</a> &#62 '  
+ '<span class = \"page_nav\"><b>' + names[sec1].pChild[sec2].pChild[sec3].pChild[sec4].sName + '</b></span>';
if (sec3 && (str_path == ''))
if (names[sec1].pChild[sec2].pChild[sec3].sName.search(/\s*page\s*\d/gi) == -1)
str_path = '<a href=\"' +  URLs[sec1].sURL + '\">' +  names[sec1].sName + '</a> &#62 '
+ '<a href=\"' +  URLs[sec1].pChild[sec2].sURL + '\">' +  names[sec1].pChild[sec2].sName + '</a> &#62 '
+ '<span class = \"page_nav\"><b>' + names[sec1].pChild[sec2].pChild[sec3].sName + '</b></span>';
if (sec2 && (str_path == ''))
if (names[sec1].pChild[sec2].sName.search(/\s*page\s*\d/gi) == -1)
str_path = '<a href=\"' +  URLs[sec1].sURL + '\">' +  names[sec1].sName + '</a> &#62 '
+ '<span class = \"page_nav\"><b>' + names[sec1].pChild[sec2].sName + '</b></span>';
if (str_path == '')
return (str_path);
return ('<table border=0 width=100% cellspacing=2 cellpadding=2><tr><td align = center>' + str_path + '</td></tr></table>');	
}
function SubSecLink(names, URLs, ptr)
{
var str_url = '';
var str_link = '';
if (sec2) {
str_url = URLs[sec1].pChild[sec2].pChild[ptr].sURL;
if(names[sec1].pChild[sec2].pChild[ptr].pChild)
if(names[sec1].pChild[sec2].pChild[ptr].pChild[1].sName.search(/\s*page\s*\d/gi) != -1)
str_url = URLs[sec1].pChild[sec2].pChild[ptr].pChild[1].sURL;
}
else if (sec1) {
str_url = URLs[sec1].pChild[ptr].sURL;
if(names[sec1].pChild[ptr].pChild)
if(names[sec1].pChild[ptr].pChild[1].sName.search(/\s*page\s*\d/gi) != -1)
str_url = URLs[sec1].pChild[ptr].pChild[1].sURL;
}
str_link = '<a href=' + str_url + '>';
return(str_link)
} 
function Locate(URLs)
{
var this_url = '';
this_url = document.URL.substring(document.URL.lastIndexOf('\\')+1, document.URL.length);
this_url = this_url.substring(this_url.lastIndexOf('\/')+1, this_url.length);
this_url = this_url.replace(/_/g, '%5f');
this_url = this_url.replace(/\./g, '%2e');
if(document.URL.lastIndexOf('\\') == -1)
this_url = "http://www.funkyzilla.com/cgi-bin/ss000000.pl?SECTIONID=" + this_url + "&NOLOGIN=1";
seek:   for (var i=1; i <= URLs.length; i++) {
if (URLs[i].sURL == this_url) {
sec1 = i;
break seek;
}
if (URLs[i].pChild) 
for (var j=1; j <= URLs[i].pChild.length; j++) {
if (URLs[i].pChild[j].sURL == this_url) {
sec1 = i;
sec2 = j;
break seek;
}
if (URLs[i].pChild[j].pChild)
for (var k=1; k <= URLs[i].pChild[j].pChild.length; k++) {
if (URLs[i].pChild[j].pChild[k].sURL == this_url) { 
sec1 = i;
sec2 = j;
sec3 = k; 
break seek;  
}
if (URLs[i].pChild[j].pChild[k].pChild)
for (var l=1; l <= URLs[i].pChild[j].pChild[k].pChild.length; l++)
if (URLs[i].pChild[j].pChild[k].pChild[l].sURL == this_url) { 
sec1 = i;
sec2 = j;
sec3 = k; 
sec4 = l;
break seek;  
}
}
}
}
return
}
function PageNav(names, URLs, i, j, k, l)
{
var str_left = '';
var str_right = '';
var str_mid = 'page ';
var pagenum = 0;
var thispage = 0;
var str_sec = '';
if (l) {
if(names[i].pChild[j].pChild[k].pChild[l].sName.search(/\s*page\s*\d/gi) == -1)
return;
thispage = l;
pagenum = names[i].pChild[j].pChild[k].pChild.length;
str_sec = names[i].pChild[j].pChild[k].sName;
if (l > 1)
str_left = '<nobr><a href =' + URLs[i].pChild[j].pChild[k].pChild[l - 1].sURL + '>page ' + (l - 1) + '</a> &#60 &#60 &#60 Click</nobr>';
if (l < names[i].pChild[j].pChild[k].pChild.length)
str_right = '<nobr> Click &#62 &#62 &#62 <a href =' + URLs[i].pChild[j].pChild[k].pChild[l + 1].sURL + '>page ' + (l + 1) + '</a></nobr>';
for (var x=1; x <= names[i].pChild[j].pChild[k].pChild.length; x++) {
if (x == l)
str_mid += x;
else
str_mid += '<a href =' + URLs[i].pChild[j].pChild[k].pChild[x].sURL + '> '  + x + ' </a>';
}
}  
else if (k) {
if(names[i].pChild[j].pChild[k].sName.search(/\s*page\s*\d/gi) == -1)
return;
thispage = k;
pagenum = names[i].pChild[j].pChild.length;
str_sec = names[i].pChild[j].sName;
if (k > 1)
str_left = '<nobr><a href =' + URLs[i].pChild[j].pChild[k - 1].sURL + '>page ' + (k - 1) + '</a> &#60 &#60 &#60 Click</nobr>';
if (k < names[i].pChild[j].pChild.length)
str_right = '<nobr> Click &#62 &#62 &#62 <a href =' + URLs[i].pChild[j].pChild[k + 1].sURL + '>page ' + (k + 1) + '</a></nobr>';
for (var x=1; x <= names[i].pChild[j].pChild.length; x++) {
if (x == k)
str_mid += x;
else
str_mid += '<a href =' + URLs[i].pChild[j].pChild[x].sURL + '> '  + x + ' </a>';
}
}  
else if (j) {
if (names[i].pChild[j].sName.search(/\s*page\s*\d/gi) == -1) 
return
thispage = j;
pagenum = names[i].pChild.length;
str_sec = names[i].sName;
if (j > 1)
str_left = '<nobr><a href =' + URLs[i].pChild[j - 1].sURL + '>page ' + (j - 1) + '</a> &#60 &#60 &#60 Click</nobr>';
if (j < names[i].pChild.length)
str_right = '<nobr> Click &#62 &#62 &#62 <a href =' + URLs[i].pChild[j + 1].sURL + '>page ' + (j + 1) + '</a></nobr>';
for (var x=1; x <= names[i].pChild.length; x++) {
if (x == j)
str_mid += '<B>' + x + '</B>';
else
str_mid += '<a href =' + URLs[i].pChild[x].sURL + '> ' + x + ' </a>';
}
}   
else 
return;
if(pagenum == 1)
return
str_nav = '<table border=0 cellspacing=0 cellpadding=0 width=100%><tr><td><img src=\"spacer.gif\" width=20 height=20></td>'
+ '<td><table border=0 cellspacing=0 cellpadding=0 width=100%><tr><td align=left> There are <span class = \"page_nav\">'
+ pagenum + ' pages</span> of <span class = \"page_nav\"><b>' + str_sec 
+ '</b></span> products.</td><td align=right> Displaying <span class = \"page_nav\">page ' + thispage
+ '</span></td></tr></table><table border=0 cellspacing=0 cellpadding=0 width=100%><tr><td align=left width=25%> '
+ str_left + ' </td><td align=center><span class = \"page_nav\">' + str_mid + '</span></td><td align=right width=25%> '
+ str_right + ' </td></tr></table></td><td><img src=\"spacer.gif\" width=20 height=20></td></tr></table>';
return
}
function Newloc(names, URLs)
{
if (sec4)
return('');
if (sec3) {
if (names[sec1].pChild[sec2].pChild[sec3].pChild)
if (names[sec1].pChild[sec2].pChild[sec3].pChild[1].sName.search(/\s*page\s*\d/gi) != -1)
return (URLs[sec1].pChild[sec2].pChild[sec3].pChild[1].sURL);
}
else if (sec2) {
if (names[sec1].pChild[sec2].pChild)
if (names[sec1].pChild[sec2].pChild[1].sName.search(/\s*page\s*\d/gi) != -1)
return (URLs[sec1].pChild[sec2].pChild[1].sURL);
}
else if (sec1) {
if (names[sec1].pChild)
if (names[sec1].pChild[1].sName.search(/\s*page\s*\d/gi) != -1)
return (URLs[sec1].pChild[1].sURL);
}
return('')
}