//
//    main_functions.js
//
//    Created by Yolanda van Kimmenade 19/01/07
//		Edited by Marilize - changed sizes on popitup 09/01/2012
//
//    Purpose : These functions to simple popups etc
//

function popitup(url) {
  sList = window.open(url, "list", "height=450,width=400");
  if (window.focus) {
         sList.focus()
    }
    return false; 
}

function remLink() {
  if (window.sList && window.sList.open && !window.sList.closed)
    window.sList.opener = null;
}

 function popexcess(url) {
    newwindow=window.open(url,'excesswin','height=500,width=500,scrollbars=yes');
    if (window.focus) {
         newwindow.focus()
    }
    return false; 
 } 

 function poplarger(url) {
    newwindow=window.open(url,'info','height=500,width=600,scrollbars=yes');
    if (window.focus) {
         newwindow.focus()
    }
    return false; 
 }

function popSearch(url) {
  sList = window.open(url, "list", "height=250,width=500,scrollbars=yes");
}

var bookmarkurl="http://www.discoverycarrentals.com/";
var bookmarktitle="Jurnii Car Rental USA - Compare & Save";

function addbookmark() {
if (navigator.appName=='Netscape')
   alert("Please close this popup, and then press CTRL+D to bookmark this site.");
else 
   window.external.AddFavorite(bookmarkurl,bookmarktitle);
}



function check_resboxstep3() {
   v_errormsg="";
   v_errorstat = false;

if (document.step3.READTERMS.checked == false)
{

   v_errormsg="Must agree to Terms & Conditions";
   v_errorstat=true;
}

   

   
   //   return the message and status
   if (v_errorstat==true) {
      alert (v_errormsg);
      return false;
   } else {
     return true;
   }
   

} // check_resbox

function hide_by_id(idname)
{
document.getElementById(idname).style.display = 'none';
}

function show_by_id(idname)
{
document.getElementById(idname).style.display = 'block';
}
