function showList(id)
{
	if (document.getElementById(id).style.display == 'none' || document.getElementById(id).style.display == 'inherit')
    {
       	document.getElementById(id).style.display = '';
	} else {
		document.getElementById(id).style.display = 'none';
    }
	
  var now = new Date();
  fixDate(now);
  now.setTime(now.getTime() + 365 * 24 * 60 * 60 * 1000);
  setCookie("droplist"+id, document.getElementById(id).style.display, now, null, null, null);
  
}
function clearEmailBox(form)
{
if (form.emailaddress.value=="Enter email address"){
form.emailaddress.value="";
}

}
function popitupBasic(theURL,winName,features)
{
	
	newwindow=window.open(theURL,winName,features);
	
	if (window.focus) {newwindow.focus()}
	return false;
}

function setCookie(name, value, expires, path, domain, secure) {
  var curCookie = name + "=" + escape(value) +
      ((expires) ? "; expires=" + expires.toGMTString() : "") +
      ((path) ? "; path=" + path : "") +
      ((domain) ? "; domain=" + domain : "") +
      ((secure) ? "; secure" : "");
  document.cookie = curCookie;
}
 
function getCookie(name) {
  var dc = document.cookie;
  var prefix = name + "=";
  var begin = dc.indexOf("; " + prefix);
  if (begin == -1) {
    begin = dc.indexOf(prefix);
    if (begin != 0) return null;
  } else
    begin += 2;
  var end = document.cookie.indexOf(";", begin);
  if (end == -1)
    end = dc.length;
  return unescape(dc.substring(begin + prefix.length, end));
}
 
function deleteCookie(name, path, domain) {
  if (getCookie(name)) {
    document.cookie = name + "=" +
    ((path) ? "; path=" + path : "") +
    ((domain) ? "; domain=" + domain : "") +
    "; expires=Thu, 01-Jan-70 00:00:01 GMT";
  }
}
 
function fixDate(date) {
  var base = new Date(0);
  var skew = base.getTime();
  if (skew > 0)
    date.setTime(date.getTime() - skew);
}

function showOrHideCCInfo() {
	var id = "ccinfo";
	var listid = "PAYMENTMETHOD";
	
	var currentmethod = document.getElementById(listid).value;
		
	if (currentmethod == "10005"){	
		
		document.getElementById(id).style.display = ''
	} else {
		
		document.getElementById(id).style.display = 'none'
	}
	
}

function addBookmarkForBrowser() 
{
	url = document.location.href;
	title = document.title;

	if (window.sidebar) {  // Firefox
		window.sidebar.addPanel(title, url,""); 
	} else if (window.external) { //MSIE
		window.external.AddFavorite( url, title);
	} else {
		alert("Sorry, your browser doesn't support this!");
	}
}
