function openPopUp(PageName){
	new_window = window.open(PageName,"new_window","width=400,height=400,location=0,menubar=0,resizable=0,scrollbars=1,status=0,titlebar=0,toolbar=0,left=150,top=50,screenx=150,screeny=50"); 
	if (new_window.opener == null) { 
		new_window.opener = self; 
	} 
	new_window.focus();
}
function openSizedPopUp(PageName, Width, Height){
	new_window = window.open(PageName,"new_window","width="+Width+",height="+Height+",location=0,menubar=0,resizable=0,scrollbars=1,status=0,titlebar=0,toolbar=0,left=150,top=50,screenx=150,screeny=50"); 
	if (new_window.opener == null) { 
		new_window.opener = self; 
	} 
	new_window.focus();
}

function bookmarksite(title, url){
if (document.all)
{
window.external.AddFavorite(url, title);
setCookie("bm", "yes" );
window.location.reload();
}
else if (window.sidebar)
window.sidebar.addPanel(title, url, "")
}

function setCookie(name, value)
         {
         //If name is the empty string, it places a ; at the beginning
         //of document.cookie, causing clearCookies() to malfunction.
         var cookie_date = new Date ( ); 
          cookie_date.setDate( cookie_date.getDate() + 2);
         if(name != '')
            document.cookie = name + '=' + value + 
                                          ';expires=' +  cookie_date.toGMTString() + ';';
         }

function getCookie(name)
         {
         //Without this, it will return the first value 
         //in document.cookie when name is the empty string.
         if(name == '')
            return('');
         
         name_index = document.cookie.indexOf(name + '=');
         
         if(name_index == -1)
            return('');
         
         cookie_value =  document.cookie.substr(name_index + name.length + 1, 
                                                document.cookie.length);
         
         //All cookie name-value pairs end with a semi-colon, except the last one.
         end_of_cookie = cookie_value.indexOf(';');
         if(end_of_cookie != -1)
            cookie_value = cookie_value.substr(0, end_of_cookie);

         //Restores all the blank spaces.
         space = cookie_value.indexOf('+');
         while(space != -1)
              { 
              cookie_value = cookie_value.substr(0, space) + ' ' + 
              cookie_value.substr(space + 1, cookie_value.length);
							 
              space = cookie_value.indexOf('+');
              }

         return(cookie_value);
         }

function fromSubmit(parUrl,parQty)
{
  var strUrl;
  if(parUrl == '') { return false; }
  strUrl = ""+parUrl + parQty + "/"
  window.location.href =  strUrl;
}