function open_country_popup() {											window.open('/docs/indices_list.html','normal','scrollbars=yes,width=700,height=500,resizable=yes,titlebar=yes,left=340,top=280');
}

function open_overture_sub_pol() { window.open('/docs/overture_sub_pol.html','normal','scrollbars=yes,width=700,height=500,resizable=yes,titlebar=yes,left=340,top=280');
}

function open_overture_privacy_pol() { window.open('/docs/overture_privacy.html','normal','scrollbars=yes,width=700,height=500,resizable=yes,titlebar=yes,left=340,top=280');
}

function open_wt_privacy_pol() { window.open('/docs/wt_privacy.html','normal','scrollbars=yes,width=700,height=500,resizable=yes,titlebar=yes,left=340,top=280');
}

function open_norm_popup() { window.open('/docs/normalization.html','normal','scrollbars=yes,width=500,height=320,resizable=yes,titlebar=yes,left=340,top=280');
}

function open_refill_popup() { window.open('/docs/refill.html','normal','scrollbars=yes,width=600,height=200,resizable=yes,titlebar=yes,left=340,top=280');
}

function open_overture_tos_popup() {	window.open('/docs/overture_tos.html','normal','scrollbars=yes,width=700,height=500,resizable=yes,titlebar=yes,left=340,top=280,statusbar=yes');
}

function open_wt_tos_popup() {	window.open('/docs/wt_tos.html','normal','scrollbars=yes,width=700,height=500,resizable=yes,titlebar=yes,left=340,top=280,statusbar=yes');
}

function open_renew_popup() {	window.open('/docs/renew.html','normal','scrollbars=yes,width=700,height=400,resizable=yes,titlebar=yes,left=340,top=280');
}

function open_cat_popup() {	window.open('/docs/categories.html','normal','scrollbars=yes,width=700,height=500,resizable=yes,titlebar=yes,left=340,top=280,statusbar=yes');
}

function ToggleAll(e, field) {
	if (e.checked) {
		CheckAll(field);
	} else {
		ClearAll(field);
	}
}

function CheckAll(field) {
	var inputs = document.forms[0].elements[field];
	for (i=0; i<inputs.length; i++) {
		inputs[i].checked = true
	}
}

function ClearAll(field) {
	var inputs = document.forms[0].elements[field];
	for (i=0; i<inputs.length; i++) {
		inputs[i].checked = false
	}
}


function MM_goToURL() { //v3.0
  var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}

function copyit(theField) {
	var tempval=eval("document."+theField)
	tempval.focus()
	tempval.select()
	therange=tempval.createTextRange()
	therange.execCommand("Copy")
}

function validate() {
	frm = document.consultation

	if (frm.name.value == ""){
		alert("Please enter your name.")
		frm.name.focus();
		return false;
	} else if (frm.phone.value == "") {
		alert("Please enter your phone number.")
		frm.phone.focus();
		return false;
	} else if (frm.email.value == "" || frm.email.value.indexOf("@") == -1 || frm.email.value.indexOf(".") == -1) {
		alert("Please enter a valid email address.")
		frm.email.focus();
		return false;
	} else if (frm.url.value == "" || frm.url.value == "http://") {
		alert("Please enter the URL of your website.")
		frm.url.focus();
		return false;
	} else {
		return true;
	}
}

function comfirm_action(msg, url){
	if(confirm(msg)) {
		location.href = url;
	}
}
