function wr( str)
{
  document.write( str);
}

try{
	str_replace( "", "", "");
} catch( e) {
	function str_replace(t, r, s){
		value = "";
		pos0 = 0;
		pos1 = 0;
		if ( s.length > 0 ){
			while( 1 ){
				pos1 = s.indexOf(t, pos0);
				if ( pos1 < 0 ) break;
				value += s.substring( pos0, pos1) + r;
				pos0 = pos1 + t.length;
			}
			value += s.substring( pos0, s.length);
		}
		return value;
	}
}

function myEscape( str)
{
  return str_replace( "/", "%2F", str_replace( "\\", "%5C", escape( str)));
}

  function change_all( this_o, tail)
  {
    if ( !tail ) tail='';
    o = document.fform.elements['' + tail + 'selected_row[]'];
    if ( this_o.checked )
    {
      if ( o && o.length )
      {
        for( i = 0; i < o.length; i++)
        {
          o[i].checked = true;
          modify_selected_rows( o[i], tail);
        }
      }
      else
      {
        if ( o )
        {
          o.checked = true;
          modify_selected_rows( o, tail);
        } 
      }
    }
    else
    { 
      if ( o && o.length )
      {
        for( i = 0; i < o.length; i++)
        {
          o[i].checked = false;
          modify_selected_rows( o[i], tail);
        }
      }
      else
      {
        if ( o )
        {
          o.checked = false;
          modify_selected_rows( o, tail);
        } 
      }
    }
  }

  function modify_selected_rows( o, tail)
  {  
    if ( !tail ) tail='';
    $ids = document.fform.elements["actioncontext[selected_rows]"].value;
    if ( o.checked )
    {
      $ids += "," + tail + o.value + ",";
    }
    else
    {
      $ids = str_replace( "," + tail + o.value + ",", '', $ids);
    }
    document.fform.elements["actioncontext[selected_rows]"].value = $ids;
    return true;
  }


  function setPointer( theRow, Color, hand)
  {
    if ( Color == "" ) Color = "#ffffff";
    if ( !hand && hand != 0 ) hand = 1;
    var theCells = null;
    if ( typeof( document.getElementsByTagName) != 'undefined')
    {
      theCells = theRow.getElementsByTagName('td');
    }
    else if ( typeof(theRow.cells) != 'undefined' )
    {
      theCells = theRow.cells;
    }
    else {
      return false;
    }

    domDetect = null;
    if (
          typeof(window.opera) == 'undefined'
          && typeof(theCells[0].getAttribute) != 'undefined'
       )
    {
      domDetect    = true;
    }
    else
    {
      domDetect    = false;
    }
    for( i = 0; i < theCells.length; i++)
    {
      if ( domDetect )
      {
        if ( !theCells[i].getAttribute('background') )
        {
          theCells[i].setAttribute( 'bgcolor', Color, 0);
          if ( hand ) theCells[i].style.cursor = "pointer";
        }
      } 
      else
      {
        if ( theCells[i].style.backGround != "#a8cbf0" )
        {
          theCells[i].style.backgroundColor = Color;
          if ( hand ) theCells[i].style.cursor = "pointer";
        }
      }
    }
    return true;
  }

  function set_perm( o, status)
  {
    if ( status == 1 )
    {
      if ( o.checked == false )
      {
        name = o.name;
        n1 = str_replace( "view", "modify", name);
        n2 = str_replace( "view", "delete", name);
        document.fform.elements[''+n1+''].checked = false;
        document.fform.elements[''+n2+''].checked = false;
      }
    }
    else if ( status == 2 )
    {
      name = o.name;
      n1 = str_replace( "modify", "view", name);
      n2 = str_replace( "modify", "delete", name);
      if ( o.checked == false )
      {
        document.fform.elements[''+n2+''].checked = false;
      }
      else
      {
        document.fform.elements[''+n1+''].checked = true;
      }
    }
    else if ( status == 3 )
    {
      name = o.name;
      n1 = str_replace( "delete", "view", name);
      n2 = str_replace( "delete", "modify", name);
      if ( o.checked == true)
      {
        document.fform.elements[''+n1+''].checked = true;
        document.fform.elements[''+n2+''].checked = true;
      }
    }
  }

function open_brochures( page, pid, table)
{   
    popup_ = window.open("","brochures",'scrollbars=1,resizable=no,width=600,height=500');
    popup_.document.open();
    popup_.document.write('<html><body>');
    popup_.document.write('<form name="sub_fform" action="admin.php" method="post">');
    popup_.document.write("<input type='hidden' name='actioncontext[page]' value='"+page+"'>");
    popup_.document.write("<input type='hidden' name='actioncontext[todo]' value=''>");
    popup_.document.write("<input type='hidden' name='actioncontext[pid]' value='"+pid+"'>");
    popup_.document.write("<input type='hidden' name='actioncontext[table]' value='"+table+"'>");
    popup_.document.write("</form>");
    popup_.document.write('</body></html>');
    popup_.document.sub_fform.submit();
    return false;
}


function open_attach( page, pid, table)
{   
    popup_ = window.open("","attachment",'scrollbars=1,resizable=no,width=650,height=500');
    popup_.document.open();
    popup_.document.write('<html><body>');
    popup_.document.write('<form name="sub_fform" action="admin.php" method="post">');
    popup_.document.write("<input type='hidden' name='actioncontext[page]' value='"+page+"'>");
    popup_.document.write("<input type='hidden' name='actioncontext[todo]' value=''>");
    popup_.document.write("<input type='hidden' name='actioncontext[pid]' value='"+pid+"'>");
    popup_.document.write("<input type='hidden' name='actioncontext[table]' value='"+table+"'>");
    popup_.document.write("</form>");
    popup_.document.write('</body></html>');
    popup_.document.sub_fform.submit();
    return false;
}

function open_preview( url, width, height)
{   
  addLayer( "Image_preview");
  Image_preview_ = new PopLayer( "Image_preview", "Image Preview", "./lib/util/popup_img.php?url="+url);
  Image_preview_.width = width-10;
  Image_preview_.height = height-10;
  Image_preview_.showMe();
}



function open_video( name, headline, width, height, type, path)
{   
  if ( path == "" ) path = "../../upload/videos/";
  if ( path.indexOf("http://") != 0 && path.indexOf( "../../") != 0 ) path = "../../"+path;
  headline2 = str_replace( "\"", "\\\"", headline);
  addLayer( "Video");
  Video_ = new PopLayer( "Video", "Video: "+headline, "./lib/util/popup_video.php?name="+myEscape( name)+"&headline="+myEscape( headline)+"&width="+myEscape( width)+"&height="+myEscape( height)+"&type="+myEscape( type)+"&path="+myEscape( path));
  Video_.width = width-(-35);
  Video_.height = height-(-85);
  Video_.showMe();
  return false;
}
function get_video_obj( name, headline, width, height, type)
{
  if ( type == 0 ){
    if ( haverp ){
      RPvideoWindow( name, width, height);
    }
    else
    {
      wr( '<div class="category_link">RealPlayer is absent, for download "'+headline+'" click <a class="category_link" href="./lib/util/getvideo.php?name='+name+'">here</a></div>');
    }
  } else   if ( type == 1 ){
//    if ( havefl ){
      FLvideoWindow( name, width, height);
//    }
//    else
//    {
//      wr( '<div class="category_link">FlashPlayer is absent, for download "'+headline+'" click <a class="category_link" href="./lib/util/getvideo.php?name='+name+'">here</a></div>');
//    }
  } else   if ( type == 2 ){
    if ( havemp ){
      MPvideoWindow( name, width, height);
    }
    else
    {
      wr( '<div class="category_link">MediaPlayer is absent, for download "'+headline+'" click <a class="category_link" href="./lib/util/getvideo.php?name='+name+'">here</a></div>');
    }
  } else   if ( type == 3 ){
    if ( haveqt ){
      QTvideoWindow( name, width, height);
    }
    else
    {
      wr( '<div class="category_link">QuickTime is absent, for download "'+headline+'" click <a class="category_link" href="./lib/util/getvideo.php?name='+name+'">here</a></div>');
    }
  }
}

function RPvideoWindow( url, width, height)
{
  wr('\
     <object id=video1 classid="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA" height='+height+' width='+width+' align="top">\
       <param name="controls" value="ImageWindow">\
       <param name="console" value="Clip1">\
       <param name="autostart" value="true">\
       <param name="src" value="'+url+'">\
       <embed type="audio/x-pn-realaudio-plugin" console="Clip1" controls="ImageWindow" height='+height+' width='+width+' autostart=true align="top" src="'+url+'">\
       </embed>\
  </object>\
     <BR><align="left"><object id=video1 classid="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA" height=25 width=45 align="top">\
       <param name="controls" value="PlayButton">\
       <param name="console" value="Clip1">\
       <embed type="audio/x-pn-realaudio-plugin" console="Clip1" controls="PlayButton" height=25 width=45 autostart=true align="top">\
       </embed>\
     </object>\
     <object id=video1 classid="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA" height=25 width=35 align="top">\
       <param name="controls" value="StopButton">\
       <param name="console" value="Clip1">\
       <embed type="audio/x-pn-realaudio-plugin" console="Clip1" controls="StopButton" height=25 width=35 autostart=true align="top">\
       </embed>\
     </object>\
  ');
}

function QTvideoWindow( url, width, height)
{
  wr('\
  <OBJECT CLASSID="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" WIDTH="'+width+'"\
     HEIGHT="'+height+'" CODEBASE="https://www.apple.com/qtactivex/qtplugin.cab">\
     <PARAM name="SRC" VALUE="'+url+'">\
     <PARAM name="AUTOPLAY" VALUE="true">\
     <PARAM name="CONTROLLER" VALUE="true">\
     <EMBED SRC="'+url+'" WIDTH="'+width+'" HEIGHT="'+height+'" AUTOPLAY="true"\
            CONTROLLER="true"\
            PLUGINSPAGE="https://www.apple.com/quicktime/download/">\
     </EMBED>\
  </OBJECT>');
}

function MPvideoWindow( url, width, height)
{
  wr('\
      <OBJECT ID="MediaPlayer" width='+width+' height='+height+'\
        classid="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95"\
        CODEBASE="https://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,5,715"\
        standby="Loading Microsoft Windows Media Player components..." \
        type="application/x-oleobject">\
          <PARAM NAME="AutoStart" VALUE="True">\
          <PARAM NAME="FileName" VALUE="'+url+'">\
          <PARAM NAME="ShowControls" VALUE="True">\
          <PARAM NAME="ShowStatusBar" VALUE="False">\
          <EMBED type="application/x-mplayer2" pluginspage="https://www.microsoft.com/Windows/MediaPlayer/"\
                 SRC="'+url+'"\
                 name="MediaPlayer"\
                 width='+width+'\
                 height='+height+'\
                 autostart=1\
                 showcontrols=1>\
          </EMBED>\
      </OBJECT>');
}

function FLvideoWindow( url, width, height)
{
  wr('\
      <OBJECT CLASSID="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"\
        CODEBASE="https://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0"\
        WIDTH='+width+' HEIGHT='+height+'>\
      <PARAM NAME=movie VALUE="'+url+'">\
      <PARAM NAME=quality VALUE=high>\
      <EMBED src="'+url+'" quality=high\
        WIDTH='+width+' HEIGHT='+height+' \
        TYPE="application/x-shockwave-flash" \
        PLUGINSPAGE="https://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash">\
      </EMBED>\
      </OBJECT>');
}

function re_sort( field)
{
  if ( document.fform.elements["nav_data[sort_field]"] )
  {
    document.fform.elements["nav_data[sort_field]"].value = field;
  }
  document.fform.submit();
}

function re_direct( field)
{
  if ( document.fform.elements["nav_data[sort_direct]"] )
  {
    if ( document.fform.elements["nav_data[sort_direct]"].value == "DESC" )
    {
      document.fform.elements["nav_data[sort_direct]"].value = "ASC";
    }
    else
    {
      document.fform.elements["nav_data[sort_direct]"].value = "DESC";
    }
  }
  document.fform.submit();
}

function print_layer( l, str)
{
  if (BR.IE) document.all[l].innerHTML = str;
  else if (BR.DOM) document.getElementById(l).innerHTML = str;
  else if (BR.NS){
    with(document.layers[l].document){
      open();
      wr(str);
      close();
    }
  }
}

function resort( sort_order, tail)
{
  if (  document.fform.elements["nav_data[sort_type" + tail + "]"].value ==  '' )  document.fform.elements["nav_data[sort_type" + tail + "]"].value = 'ASC';
  if ( document.fform.elements["nav_data[sort_order"+tail+"]"].value == sort_order )
  {
    if ( document.fform.elements["nav_data[sort_type" + tail + "]"].value == 'DESC' )
    {
      document.fform.elements["nav_data[sort_type" + tail + "]"].value = 'ASC';
    }
    else
    {
      document.fform.elements["nav_data[sort_type" + tail + "]"].value = 'DESC';
    }
  }
  else
  {
    document.fform.elements["nav_data[sort_type" + tail + "]"].value = 'ASC';
    document.fform.elements["nav_data[sort_order"+tail+"]"].value = sort_order;
  }
}

function change_font( o, color)
{
  o.style.cursor = "hand";
  o.style.color = color;
}
function reset_color( input_store, input)
{
  document.fform.elements[input_store].value = "";
  document.fform.elements[input].style.color = "";
}

function numberFormat( number, len)
{
  str = ""+number;
  while( str.length < len ) str = "0"+str;
  return str;
}
function getTime( now)
{
  h = now.getHours();
  if ( h > 12 ) 
  {
    ampm  = "pm";
    h -= 12;
  }
  else
  {
    ampm  = "am";
  }
  h = numberFormat( h, 2);
  m = numberFormat( now.getMinutes(), 2);
  s = numberFormat( now.getSeconds(), 2);
  return h+":"+m+":"+s+"&nbsp;"+ampm;
}
function getTime2( time)
{
  h = numberFormat( time.getUTCHours(), 2);
  m = numberFormat( time.getUTCMinutes(), 2);
  s = numberFormat( time.getUTCSeconds(), 2);
  return h+":"+m+":"+s;
}
function writeClock()
{
	try{
		IE=false;DOM=false;
		appName   = navigator.appName;
		userAgent = navigator.userAgent;
		if (appName.indexOf("Internet Explorer") != -1) IE = true;
		if ( document.getElementById ) DOM = true;
		  var days = new Array( "Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday");
		var months = new Array( "January","February","March","April","May","June","July","August","September","October","November","December");
		var now = new Date();
		str = months[now.getMonth()] + "&nbsp;" + now.getDate() + ",&nbsp;" + now.getFullYear() + "&nbsp;&nbsp;|&nbsp;&nbsp;" + getTime( now);

		str = "<span class='clock'>"+str+"&nbsp;&nbsp;&nbsp;&nbsp;</span>";

		if (IE) document.all['clock'].innerHTML = str;
		else if (DOM) document.getElementById('clock').innerHTML = str;
	} catch ( e) {};
	setTimeout( "writeClock()", 1000);
}

function writeDateTime()
{
  var days = new Array( "Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday");
  var months = new Array( "January","February","March","April","May","June","July","August","September","October","November","December");
  var now = new Date();
  str = days[now.getDay()] + "&nbsp;" + numberFormat(now.getMonth()+1, 2) + "." + numberFormat( now.getDate(), 2) + "." + now.getFullYear();
  document.write( str);
}

function copy_shipping_info()
{
  o = document.fform;
  o.elements["form_data[bill_first_name]"].value = 	o.elements["form_data[ship_first_name]"].value;
  o.elements["form_data[bill_last_name]"].value = 	o.elements["form_data[ship_last_name]"].value;
  o.elements["form_data[bill_company]"].value = 		o.elements["form_data[ship_company]"].value;
  o.elements["form_data[bill_address]"].value = 		o.elements["form_data[ship_address]"].value;
  o.elements["form_data[bill_post_code]"].value = 	o.elements["form_data[ship_post_code]"].value;
  o.elements["form_data[bill_city]"].value = 		o.elements["form_data[ship_city]"].value;
 
  index = o.elements["form_data[countryship]"].selectedIndex;
  o.elements["form_data[countrybill]"].selectedIndex = index;
  getStatelist( o.elements["form_data[countrybill]"].value, 'bill')

  index = o.elements["form_data[state_provinceship]"].selectedIndex;
  o.elements["form_data[state_provincebill]"].selectedIndex = index;
  o.elements["form_data[state_provincebill]"].value = 		o.elements["form_data[state_provinceship]"].value;

  if ( o.elements["form_data[ship_ponumber]"] )  o.elements["form_data[bill_ponumber]"].value = o.elements["form_data[ship_ponumber]"].value;

  o.elements["form_data[bill_phone]"].value = 		o.elements["form_data[ship_phone]"].value;
}


function trussConLayerWr( name, id)
{
  document.write( "<div ID='"+name+"_"+id+"'><span class=normal>"+l_data[''+id+'']['0'][''+name+'']+"</span></div>");
}

function reset_list( tail)
{
  document.fform.elements['nav_data[sort_order'+tail+']'].value='';
  document.fform.elements['nav_data[sort_type'+tail+']'].value='';
  o = document.fform.elements;
  len = o.length;
  for( i=0; i<len; i++)
  {
    if ( o[i].name.indexOf( "filter_data") == 0 )
    {
      o[i].value = "";
    }
  }
}

function hide_layer( name)
{
  if ( !document.getElementById( name) ) return;
  var content = document.getElementById("forLayers").innerHTML;
  patern = "<div ID="+name+"[^ÿ]*</div>";
  var regexpr = new RegExp( patern, "i");
  content = content.replace( regexpr, "");
  document.getElementById("forLayers").innerHTML = content;
}
function addLayer( id)
{
//  deleteAllLayer();
  if ( document.getElementById( id) ) return;
  var content = document.getElementById("forLayers").innerHTML;
  content += '<div ID="'+id+'" style="position:absolute;left:-1000;top:-1000"></div>';
  document.getElementById("forLayers").innerHTML = content;
}
function deleteAllLayer()
{
  document.getElementById("forLayers").innerHTML = "";
}

function show_privacy()
{
  addLayer( "Privacy");
  Privacy_ = new PopLayer( "Privacy", "Privacy Policy", "./privacy_policy.html");
  Privacy_.width = 600;
  Privacy_.height = 400;
  Privacy_.showMe();
}
function show_legal()
{
  addLayer( "Legal");
  Legal_ = new PopLayer( "Legal", "Legal Terms", "./terms.html");
  Legal_.width = 600;
  Legal_.height = 300;
  Legal_.showMe();
}
function show_login_help()
{
  addLayer( "LoginHelp");
  LoginHelp_ = new PopLayer( "LoginHelp", "Login Help", "./login_help.html");
  LoginHelp_.width = 600;
  LoginHelp_.height = 300;
  LoginHelp_.showMe();
}
function show_print()
{
//document.fform.elements['actioncontext[print]'].value='yes';document.fform.target='pop_up_layer_frame';submit_fform();document.fform.target='_self';document.fform.elements['actioncontext[print]'].value='';
  var o = document.fform.elements;
  var param = "";
  var page = "";
  for( i=0; i < o.length; i++)
  {
    if ( o[i].name.substr( 0, 13) == "actioncontext" )
    {
      var name = o[i].name.substr( 14, o[i].name.length-15);
      if ( name == "page" )
      {
		if( o[i].value == "" ) {
	      page = "home.html?1";
		} else {
	      page = o[i].value+".html?1";
		}
      }
      if ( name == "print" )
      {
        continue;
      }
      else
      {
        param += "&"+name+"=" + o[i].value;
      }
    }
  }
  addLayer( "Print");
  Print_ = new PopLayer( "Print", "Print", page + param + "&print=yes");
  Print_.width = 600;
  Print_.height = 400;
  Print_.showMe();
}

function open_email_to_friend( page, todo, id, pid)
{
  addLayer( "Email");
  Email_ = new PopLayer( "Email", "Email to a friend", "./email_to_friend.html?page_="+page+"&todo_="+todo+"&id_="+id+"&pid_="+pid);
  Email_.iframe_width = 520;
  Email_.height = 500;
  Email_.showMe();
}

function open_save_article( page, todo, id, pid, title)
{
  addLayer( "Save");
  Save_ = new PopLayer( "Save", "Save article", "./save_article.html?page_="+page+"&todo_="+todo+"&id_="+id+"&pid_="+pid+"&title_="+title);
  Save_.iframe_width = 520;
  Save_.height = 500;
  Save_.showMe();
}

function open_help_alert()
{
  clearTimeout( open_help_alert_id);
  if ( document.getElementById("forLayers").innerHTML != "" )  return false;
  if ( getCookie( "help_alert") == "true" ) return false;
  setCookie( "help_alert", "true");
//  addLayer( "HelpAlert");
//  HelpAlert_ = new PopLayer( "HelpAlert", "Do you need any help?", "./help_alert.html");
//  HelpAlert_.iframe_width = 520;
//  HelpAlert_.height = 500;
//  HelpAlert_.showMe();
}

function open_email_alert( page, todo, id, pid, title)
{
  addLayer( "EmailAlert");
  EmailAlert_ = new PopLayer( "EmailAlert", "Email Alert", "./email_alert.html?page_="+page+"&todo_="+todo+"&id_="+id+"&pid_="+pid+"&title_="+myEscape( title));
  EmailAlert_.iframe_width = 520;
  EmailAlert_.height = 500;
  EmailAlert_.showMe();
}

function openGlossaryLayer( title, content)
{   
  addLayer( "GlossaryLayer");
  GlossaryLayer_ = new PopLayer2( "GlossaryLayer", title, content);
  GlossaryLayer_.width = 400;
  GlossaryLayer_.align = "left";
  GlossaryLayer_.bgcolor = "#FFFEA6";
  GlossaryLayer_.showMe();
}


try{
function setCookie(name, value){var curCookie = name + "=" + escape(value);document.cookie = curCookie}
function getCookie(name){var prefix = name + "=";var cookieStartIndex = document.cookie.indexOf(prefix);if (cookieStartIndex == -1) return null;var cookieEndIndex = document.cookie.indexOf(";", cookieStartIndex + prefix.length);if (cookieEndIndex == -1) cookieEndIndex = document.cookie.length;return unescape(document.cookie.substring(cookieStartIndex + prefix.length, cookieEndIndex));}
} catch( e){};

function openWindow( url, name, attr)
{
//attr = resizable=1,width=502,height=550;
  window.open( url, name, attr);
}

function showHideBlock( id, type, show)
{
  var o = document.getElementById( id);
  isEI = (document.all && navigator.userAgent.indexOf("Opera")==-1)?1:0;
  if ( show )
  {
    if ( isEI )
    {
      o.style.display = "inline";
    }
    else
    {
      if ( type == "tr" ) o.style.display = "table-row";
      else if ( type == "td" ) o.style.display = "table-cell";
    }
  } else
  {
    o.style.display = "none";
  }
}

function roundFloat( f, n)
{
  d = Math.pow( 10, n);
  return Math.round( f*d)/d;
}

function getHumanFileSize( size)
{
  if ( size > 1024*1024 )
  {
    size = roundFloat( size/(1024*1024), 3) + "MByte(s)";
  }
  else if ( size > 1024 )
  {
    size = roundFloat( size/(1024), 3) + "KByte(s)";
  }
  else
  {
    size = roundFloat( size, 0) + "Byte(s)";
  }
  return size;
}


function loadUrlIntoPopUpLayer( title, url, width, height)
{
  addLayer( "LoadUrl");
  LoadUrl_ = new PopLayer( "LoadUrl", title, url);
  LoadUrl_.iframe_width = width;
  LoadUrl_.height = height;
  LoadUrl_.showMe();
}


function windowScroll()
{
  all_layers = document.getElementById( "forLayers").innerHTML;
  regexp = /\<div[ ]+id=([^ \>]+)/gi;
  regexp2 = /\<div[ ]+id=["']?([^ \>"']+)["']?/i;
  res = all_layers.match( regexp);
  layers_ids = new Array();
  try
  {
    i3 = 0;
    for( i=0;i<res.length;i++)
    {
      res2 = res[i].match( regexp2);
      if ( res2[1].length > 0 ) layers_ids[i3++] = res2[1];
    }
  } catch( ex){};
  for( i=0;i<layers_ids.length;i++)
  {
    eval( layers_ids[i]+"_.onScroll();");
  }
}
function butClick( but_obj)
{
  return;
}
function openProductBuild()
{
  addLayer( "ProductBuild");
  ProductBuild_ = new PopLayer( "ProductBuild", "Product Build", "./product_build.html");
  ProductBuild_.width = 510;
  ProductBuild_.height = 400;
  ProductBuild_.showMe();
}

function openPopUpURL( url)
{   
  popupPage_ = window.open( url,"openPopUpURL",'');
  return false;
}

function open_password_forgot()
{
  addLayer( "PasswordForgot");
  PasswordForgot_ = new PopLayer( "PasswordForgot", "Password Forgot", "./forgot_password.html");
  PasswordForgot_.iframe_width = 520;
  PasswordForgot_.height = 500;
  PasswordForgot_.showMe();
}
