function popup_help(page) {

window.open('/3clicks/help/'+page, '', 'toolbar=0,scrollbars=1,location=0,statusbar=1,menubar=0,resizable=1,width=600,height=600');
return false;
}

function popUpEdit(url) {

window.open(url, '', 'toolbar=0,scrollbars=1,location=0,statusbar=1,menubar=0,resizable=1,width=800,height=600');

}

function popUpGeneralOverview(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=1,menubar=0,resizable=1,width=800,height=700');");
}

function popUpStep2(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=1,menubar=0,resizable=1,width=750,height=700');");
}

function popUpStep3(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=1,menubar=0,resizable=1,width=800,height=700');");
}

function popUpStep4(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=1,menubar=0,resizable=1,width=800,height=700');");
}



function pp_change(pp_id) {
//alert(pp_id);
	var pp_display = '';
	for (var i = 1; i < 5; i++){
		//alert(pp_display);
		if (pp_id == i) {pp_display = 'block';} else {pp_display = 'none';}
		document.getElementById('ppp_'+i).style.display = pp_display;
	}
}

function check_step2(){
	var flag = false;

	for (var i=0; i<3; i++){
		if (document.step2.payProMethod[i].checked){
			var pp = document.step2.payProMethod[i].value;
		}
	}
	
	if (pp == 'authorize'){ 
		if (document.step2.textlogin.value != '') {
			if (document.step2.textTrnKey.value != ''){
				flag = true;
			} else {alert('Please complete payment processor details');document.step2.textTrnKey.style.borderColor='red';document.step2.textTrnKey.focus(); return false;}
		} else {alert('Please complete payment processor details');document.step2.textlogin.style.borderColor='red';document.step2.textlogin.focus(); return false;}
	}
	
	if (pp == 'clickbank'){ 
		if (document.step2.textClick.value != '') {
			if (document.step2.textfield21.value != ''){
				flag = true;
			} else {alert('Please complete payment processor details');document.step2.textfield21.style.borderColor='red';document.step2.textfield21.focus(); return false;}
		} else {alert('Please complete payment processor details');document.step2.textClick.style.borderColor='red';document.step2.textClick.focus(); return false;}
	}
	
	if (pp == 'paypal'){ 
		if (document.step2.textemail.value != '') {
			flag = true;
		} else {alert('Please complete payment processor details');document.step2.textemail.style.borderColor='red';document.step2.textemail.focus(); return false;}
	}
	
if (flag == false) {alert('Please complete payment processor details');document.getElementById('radios').style.background='yellow';document.step2.payProMethod[0].focus(); return false;}
return true;
}
