// JavaScript Document


function popUp(URL) {

  var width,height;
	width="450";
	height="300";
  var left = (screen.width/2) - width/2;
  var top = (screen.height/2) - height/2;

day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=no,location=0,statusbar=0,menubar=0,resizable=0,width="+width+",height="+height+",,left="+left+",top="+top+"');");
}

  function myloc() {
          
            var loc=location.href;
            //Strip out any anchors
            var apos=loc.indexOf('#');
            loc=encodeURIComponent((apos>0?loc.substring(0,apos):loc));
            return loc;
			
          }

          // a function that returns our current title
          function mytitle() {
          
            var title = encodeURIComponent(document.title);
            return title;
			
			
          }

  // bookmark this page
          function bookmarksite(title,url){
		 // alert(title);
         // alert(url);
            if (window.sidebar) // firefox
              window.sidebar.addPanel(title, url, "");
            else if(window.opera && window.print){ // opera
              var elem = document.createElement('a');
              elem.setAttribute('href',url);
              elem.setAttribute('title',title);
              elem.setAttribute('rel','sidebar');
              elem.click();
            } 
            else if(document.all)// ie
              window.external.AddFavorite(url, title);
          }


          // create the link for mail a friend
          function mailafriend() {

            myurl = "/cud_update/mailafriend.php?url=" + myloc() + "&title=" + mytitle();
            var load = window.open(myurl,"","scrollbars=no,menubar=no,height=600,width=600,resizable=yes,toolbar=no,location=no,status=no");
          }
		  
		 function roll_over(img_name, img_src) {
        document[img_name].src = img_src;
      }
// End -->


