function URLDecode(psEncodeString) 
{
  // Create a regular expression to search all +s in the string
  var lsRegExp = /\+/g;
  // Return the decoded string
  return unescape(String(psEncodeString).replace(lsRegExp, " ")); 
}
function UpdateNavigation(){
        if (document.images && top.frames[1]){
                if(parseInt(navigator.appVersion) > 3){
                        if (top.frames[1].window.NavigationLoaded==true){
                                var pathname = top.frames[0].window.location.pathname;
                                var topLevelDirectory = pathname.substring(1, (pathname.indexOf('/',1)));
                                top.frames[1].window.HighlightSection(topLevelDirectory);
                                top.frames[1].window.UpdateTriVida(pathname);
                        }
                }
        }
}
function PageLoad() {
	querystring = location.search.substring(1);
	startsearch = querystring.indexOf(frames);
	if (startsearch == -1) {
		if (navigator.appName == "Netscape" || navigator.appVersion.indexOf("MSIE")){
			if(top.frames.length == 0) {
				var page = '/shopregi.php?frames=1&' + URLDecode(location.search.substring(1));
				CreateFrames(page);
				return;
			}
        }
    }
}
function CreateFrames(mainSrc) {
document.write("<HTML><HEAD>\n");
document.write("<TITLE>Equip4sheetmetal</TITLE>\n");
document.write("</HEAD>\n");
document.write('<frameset cols="*,770,*" framespacing="0" frameborder="no" border="0">'+"\n");
document.write('<frame src="f_left.html" name="left" frameborder="no" scrolling="no" noresize marginwidth="0" marginheight="0">'+"\n");
document.write('<frameset rows="75,30,*,30" framespacing="0" frameborder="no" border="0">'+"\n");
document.write('<frame src="f_top.html" name="head" frameborder="no" scrolling="no" noresize marginwidth="0" marginheight="0">'+"\n");
document.write('<frame src="f_navbar.html" name="navbar" frameborder="no" scrolling="no" noresize marginwidth="0" marginheight="0">'+"\n");
document.write('<frame src="'+mainSrc+'" name="shopmain" frameborder="NO" noresize scrolling="AUTO" marginwidth="0" marginheight="0">'+"\n");
document.write('<frame src="f_sub.html" name="sub" frameborder="no" scrolling="no" noresize marginwidth="0" marginheight="0">'+"\n");
document.write('</frameset>'+"\n");
document.write('<frame src="f_rght.html" name="rght" frameborder="no" scrolling="no" noresize marginwidth="0">'+"\n");
document.write("</frameset>\n");
}
