// tell a friend script
subject = "Certification Mock Test, Questions and Answers";
body = "I found this website and thought it might be interested to you. http://www.certcrunch.com. - It provides mock test of  IT Certifications.";


function emailToFriends(){


	window.location = "mailto:"+"?subject="+subject+"&body="+body;
}

//Bookmark site
function bookmarkSite(url,title){
 //for internet explorer
 if ((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4)) {
 	window.external.AddFavorite(url,title);
 }
 //for firefox
 else if (navigator.appName == "Netscape") {
   window.sidebar.addPanel(title,url,"111");
 }
 //for older netscape and opera
 else {
   alert("Press CTRL-D (Netscape) or CTRL-T (Opera) to bookmark");
 }
}



function limitChars(obj, max)
 {
 
   var tmpV = obj.value;  
   
   if(tmpV.length > max)
   {
    obj.value = tmpV.substr(0, max);        
   }
  
 
 }



function getURLBase()
 {
 
   var baseURL = "";  
   
   if(document.getElementsByTagName)
   {
      var elems = document.getElementsByTagName('base');
      
      if(elems.length)
      {
      baseURL = elems[0].href;
      }
   }
   
   return baseURL;  
 
 }


function adjustHeight(obj, lines)
{
lines = typeof(lines) != 'undefined' ? lines : 3;
var b = obj.value;
var temp = new Array();
temp = b.split('\n');
obj.rows = temp.length  + lines;
}
