
if(!document.getElementById){
  if(document.all)
  document.getElementById=function(){
    if(typeof document.all[arguments[0]]!="undefined")
    return document.all[arguments[0]]
    else
    return null
  }
  else if(document.layers)
  document.getElementById=function(){
    if(typeof document[arguments[0]]!="undefined")
    return document[arguments[0]]
    else
    return null
  }
}

function emailLink(username,hostname,suffix,emailclass) {
	document.write("<a href=" + "mail" + "to:" + username + "@" + hostname + "." + suffix +" class='" + emailclass + "'>" + username + "@" + hostname + "." + suffix + "</a>")
}

function openManWebsite(url) {
	objbrandwindow=window.open('../../manufacturer-frame.asp?' + url,'brandwin',"toolbar=no,directories=no,menubar=no,status=no,resizable=yes,location=0,scrollbars=yes,copyhistory=no,width=1000,height=720,top=0,left=0");
	objbrandwindow.focus();
}
function openWin(url) {
	objnewwindow=window.open(url,'newwin',"toolbar=yes,directories=no,menubar=yes,status=no,resizable=yes,location=0,scrollbars=yes,copyhistory=no,width=700,height=720,top=0,left=0");
	objnewwindow.focus();
}

function getCookie(NameOfCookie){
	if (document.cookie.length > 0) {              
		begin = document.cookie.indexOf(NameOfCookie+"=");       
		if (begin != -1) {           
			begin += NameOfCookie.length+1;     
			end = document.cookie.indexOf(";", begin);
			if (end == -1) end = document.cookie.length;
			return unescape(document.cookie.substring(begin, end));
		} 
	}
	return null;
}

function setCookie(NameOfCookie, value, expiredays) {
	var ExpireDate = new Date();
	ExpireDate.setTime(ExpireDate.getTime() + (expiredays * 24 * 3600 * 1000));
	document.cookie = NameOfCookie + "=" + escape(value) + ((expiredays == null) ? "" : "; expires=" + ExpireDate.toGMTString());
}

