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 newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}

function changeImages() {
	if (document.images && (preloadFlag == true)) {
		for (var i=0; i<changeImages.arguments.length; i+=2) {
			document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
		}
	}
}

var preloadFlag = false;
function preloadImages() {
	if (document.images) {
		home_over = newImage("images/homeover.gif");
		whoweare_over = newImage("images/whoweareover.gif");
		aboutplan_over = newImage("images/aboutplanover.gif");
		howitworks_over = newImage("images/howitworksover.gif");
		findprovider_over = newImage("images/findproviderover.gif");
		infohelp_over = newImage("images/infohelpover.gif");
		contactus_over = newImage("images/contactusover.gif");
		brokersneeded_over = newImage("images/brokersneededover.gif");
		preloadFlag = true;
	}
}

function doAction() {
stroka=document.pvdsubs.email.value; ind=stroka.indexOf('\@');
if (ind>0 && ind<stroka.length-1) {
  pvdWin= open("", "pvdwin", "width=350,height=200");
  pvdWin.focus(); pvdWin.document.open();
  pvdWin.document.write("<html><head><title>Process data...");
  pvdWin.document.write("</title></head>");
  pvdWin.document.write("<body topmargin=0 bgcolor=#F9F1D7 leftmargin=0 marginwidth=0 marginheight=0>");
  pvdWin.document.write("<table width=100% height=100% align=center><tr><td align=center>Wait please...</td></tr></table>");
  pvdWin.document.write("</body></html>");
  pvdWin.document.close();  
document.pvdsubs.submit();
}
else {alert('Wrong email');}
return (false);
}