<!-- //


function chgType_pm(o) {
	f=o.form;
    if(doctype_view==0) {
        si_=f['doctype'].value;
    } else {
        si_=f['doctype'+getNumeric(o,'doctype')].options[f['doctype'+getNumeric(o,'doctype')].selectedIndex].value;
    }
    toshowTr(o,si_); ///// 
}    

function popup_notver(dos) {
    info=window.open("","info","toolbar=no,location=no,top=200,left=300,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width=400,height=250");
    info.document.open();
    if(dos==1) {
        info.document.write("<html><head><title>NOT VERIFIED</title></head><body>")
        info.document.write("<p>Your payment details were incorrectly given/not given. Please provide us with correct payment details to have them verified and your payment will be processed accordingly.</p>");
    }
    
    info.document.write("</body></html>");
    info.document.close();
    return true;
}

function wrpm_popdef(dos){
    info=window.open("","info","toolbar=no,location=no,top=200,left=300,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width=400,height=250");
    info.document.open();
    if(dos==1) {
        info.document.write("<html><head><title>PayPal info</title></head><body>")
        info.document.write("<p>Your e-mail registered with <a href='http://www.paypal.com' class='small' target='_blank'>PayPal.com</a></p>");
    }
    
    if(dos==2) {
        info.document.write("<html><head><title>E-Gold info</title></head><body>")
        info.document.write("<p>Your <a href='http://www.e-gold.com' class='small' target='_blank'>e-gold.com</a> account number<br/>Maximum 10 digits</p>");
    }
    
    if(dos==3) {
        info.document.write("<html><head><title>Wire Transfer info</title></head><body>")
        info.document.write("<p>8 digits OR 11 digits</p>");
    }
    
    if(dos==4) {
        info.document.write("<html><head><title>Wire Transfer info</title></head><body>")
        info.document.write("<p>Maximum 20 digits</p>");
    }
    
    if(dos==5) {
        info.document.write("<html><head><title>Wire Transfer info</title></head><body>")
        info.document.write("<p>9 digits only</p>");
    }
    
    if(dos==6) {
        info.document.write("<html><head><title>Wire Transfer info</title></head><body>")
        info.document.write("<p>8 digits OR 11 digits</p>");
    }
    
    if(dos==7) {
        info.document.write("<html><head><title>ACH info</title></head><body>")
        info.document.write("<p>9 digits only</p>");
    }
    
    if(dos==8) {
        info.document.write("<html><head><title>ACH info</title></head><body>")
        info.document.write("<p>Maximum 20 digits</p>");
    }
    
    if(dos==9) {
        info.document.write("<html><head><title>xoom.com info</title></head><body>")
        info.document.write("<p>4 digits only</p>");
    }
    
    if(dos==10) {
        info.document.write("<html><head><title>xoom.com info</title></head><body>")
        info.document.write("<p>6 digits only</p>");
    }
    if(dos==11) {
        info.document.write("<html><head><title>ACH info</title></head><body>")
        info.document.write("<p>Full name of account holder.</p>");
    }
    if(dos==12) {
        info.document.write("<html><head><title>Wire Transfer info</title></head><body>")
        info.document.write("<p><b>Beneficiary</b> - legal recipient of money. <p><b>Beneficiary name</b> - Full name of account holder.</p>");
    }
    
    if(dos==13) {
        info.document.write("<html><head><title>Wire Transfer info</title></head><body>")
        info.document.write("<p>Postal code, city, street and house/flat number where beneficiary lives.</p>");
    }
    
    if(dos==14) {
        info.document.write("<html><head><title>FirePay</title></head><body>")
        info.document.write("<p>FirePay Account E-mail</p>");
    }
    
    if(dos==15) {
        info.document.write("<html><head><title>FirePay</title></head><body>")
        info.document.write("<p>16 digits only</p>");
    }
    
    info.document.write("</body></html>");
    info.document.close();
    return true;
}

function wr_alike(str_val) {
    info=window.open("","info","toolbar=no,location=no,top=200,left=300,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width=400,height=250");
    info.document.open();

    info.document.write("<html><head><title>Keywords</title></head><body>")
    info.document.write("<p>" + str_val + "</p>");

    info.document.write("</body></html>");
    info.document.close();
    return true;
}

function onblur_digits(id) {
    var txtint=document.getElementById(id);
    values = txtint.value;
    len = values.length;

    var pattern=new RegExp("\\s");
    if (isNaN(txtint.value) == true || pattern.test(txtint.value)) {
        alert("digits only");  
        txtint.focus();
        txtint.select();
    }
    
    if(len==8 || len==11) {
    } else {
       alert("8 digits OR 11 digits only");  
       txtint.focus();
       txtint.select();
    }
    
} 
 
function onblur_digits2(id) {
    var txtint=document.getElementById(id);
    values = txtint.value;
    len = values.length;

    var pattern=new RegExp("\\s");
    if (isNaN(txtint.value) == true || pattern.test(txtint.value)) {
        alert("digits only");  
        txtint.focus();
        txtint.select();
    }
    
    if(len==9) {
    } else {
       alert("9 digits only");  
       txtint.focus();
       txtint.select();
    }
    
}  

function onblur_digits3(id) {
    var txtint=document.getElementById(id);
    values = txtint.value;
    len = values.length;

    var pattern=new RegExp("\\s");
    if (isNaN(txtint.value) == true || pattern.test(txtint.value)) {
        alert("digits only");  
        txtint.focus();
        txtint.select();
    }
}

function onblur_digits61(id) {
    var txtint=document.getElementById(id);
    values = txtint.value;
    len = values.length;

    var pattern=new RegExp("\\s");
    if (isNaN(txtint.value) == true || pattern.test(txtint.value)) {
        alert("digits only");  
        txtint.focus();
        txtint.select();
    }
    
    if(len==16) {
    } else {
       alert("16 digits only");  
       txtint.focus();
       txtint.select();
    }
    
}


function check_ph_name(ff, ll, id) {
    var str_ff=document.getElementById(ff).value;
    var str_ll=document.getElementById(ll).value;

    document.getElementById(id).value=str_ff+' '+str_ll;
} 

//onChange="check_fields('pm_options_xoom36','xoom_first_name24','xoom_last_name25','xoom_ph_bank_name37','xoom_ph_acc_holder_name38','xoom_ph_bb_acc_number39');"  

function check_fields(val, id, ff, ll, id1, id2, id3, curr_id) {
    var str_ff=document.getElementById(ff).value;
    var str_ll=document.getElementById(ll).value;
    
    document.getElementById(id2).value=str_ff+' '+str_ll;
    
    si=document.getElementById(id).selectedIndex;
    vi = document.getElementById(id);
    
    //alert(vi.options[si].value);
    
    val_r = vi.options[si].value;
    if(val_r==val) {
        document.getElementById('save_pid').style.display='none';
        
        str1 = document.getElementById(id1).value;
        if(str1.length=='' || str1=='Not empty') {
            str_id1=document.getElementById(id1);
            //alert("Not empty"); 
            str_id1.value = 'Not empty'   
            str_id1.focus();
            str_id1.select();
        } else {
            str1 = document.getElementById(id3).value; 
            if(str1.length=='' || str1=='Not empty') {
                str_id3=document.getElementById(id3);
                //alert("Not empty"); 
                str_id3.value = 'Not empty'   
                str_id3.focus();
                str_id3.select();
            } else {
                document.getElementById('save_pid').style.display='';
            }
        }
        document.getElementById(curr_id).selectedIndex=1; 
    }  else {
        //alert(document.getElementById(curr_id).selectedIndex);
        document.getElementById('save_pid').style.display=''; 
        document.getElementById(curr_id).selectedIndex=0; 
        document.getElementById(id1).value='';
        document.getElementById(id2).value='';
        document.getElementById(id3).value='';
    }
} 

function not_empty(val_main, id_main, id, id1) {
    si=document.getElementById(id_main).selectedIndex;
    vi = document.getElementById(id_main);
    val_r = vi.options[si].value;
    
    if(val_r==val_main) {
        str = document.getElementById(id).value; 
        if(str.length=='' || str=='Not empty') {
            str_id=document.getElementById(id);
            //alert("Not empty"); 
            str_id.value = 'Not empty' 
            str_id.focus();
            str_id.select();
        } else {
            str = document.getElementById(id1).value; 
            if(str.length=='' || str=='Not empty') {
                str_id=document.getElementById(id1);
                //alert("Not empty"); 
                str_id.value = 'Not empty'  
                str_id.focus();
                str_id.select();
            } else {
                document.getElementById('save_pid').style.display='';
            }
        }
    }
} 


function check_fields2(val_main, id_main, ff, ll, id0, id1, id2, id3, id4, id5) {
    var str_ff=document.getElementById(ff).value;
    var str_ll=document.getElementById(ll).value;
    
    
    document.getElementById(id0).value=str_ff+' '+str_ll;
    
    si=document.getElementById(id_main).selectedIndex;
    vi = document.getElementById(id_main);
    
    //alert(vi.options[si].value);
    
    val_r = vi.options[si].value;
    if(val_r==val_main) {
        document.getElementById('save_pid').style.display='none';
    
        str1 = document.getElementById(id1).value;
        if(str1.length=='' || str1=='Not empty') {
            str_id1=document.getElementById(id1);
            //alert("Not empty"); 
            str_id1.value = 'Not empty' 
            str_id1.focus();
            str_id1.select();
        }  else {
            if(id2!=0) {
                str = document.getElementById(id2).value;
                if(str.length=='' || str=='Not empty') { 
                    str_id=document.getElementById(id2);
                    //alert("Not empty");
                    document.getElementById(id2).value = 'Not empty';    
                    str_id.focus();
                    str_id.select();
                } else if(id3!=0) {
                    str = document.getElementById(id3).value;
                    if(str.length=='' || str=='Not empty') { 
                        str_id=document.getElementById(id3);
                        document.getElementById(id3).value = 'Not empty';
                        //alert("Not empty");  
                        str_id.focus();
                        str_id.select();
                    } else if(id4!=0) {
                        str = document.getElementById(id4).value;
                        if(str.length=='' || str=='Not empty') { 
                            str_id=document.getElementById(id4);
                            document.getElementById(id4).value = 'Not empty';  
                            //alert("Not empty");  
                            str_id.focus();
                            str_id.select();
                        } else if(id5!=0) {
                            str = document.getElementById(id5).value;
                            if(str.length=='' || str=='Not empty') { 
                                str_id=document.getElementById(id5);
                                document.getElementById(id5).value = 'Not empty';  
                                //alert("Not empty");  
                                str_id.focus();
                                str_id.select();
                            } else {
                                document.getElementById('save_pid').style.display='';
                            }
                        }
                    }         
                }             
            }
        }

    }  else {
        //alert(document.getElementById(curr_id).selectedIndex);
        document.getElementById('save_pid').style.display='';
        document.getElementById(id0).value=''; 
        document.getElementById(id1).value='';
        document.getElementById(id2).value='';
        document.getElementById(id3).value='';
        document.getElementById(id4).value='';
        document.getElementById(id5).value=''; 
    }
}

function not_empty2(val_main, id_main, id1, id2, id3, id4, id5) {
    si=document.getElementById(id_main).selectedIndex;
    vi = document.getElementById(id_main);
    val_r = vi.options[si].value; 
    if(val_main==val_r) {
        if(id1!=0) {
            str = document.getElementById(id1).value;
            if(str.length=='' || str=='Not empty') { 
                str_id=document.getElementById(id1);
                document.getElementById(id1).value = 'Not empty';  
                //alert("Not empty");  
                str_id.focus();
                str_id.select();
            } else if(id2!=0) {
                str = document.getElementById(id2).value;
                if(str.length=='' || str=='Not empty') { 
                    str_id=document.getElementById(id2);
                    //alert("Not empty");
                    document.getElementById(id2).value = 'Not empty';    
                    str_id.focus();
                    str_id.select();
                } else if(id3!=0) {
                    str = document.getElementById(id3).value;
                    if(str.length=='' || str=='Not empty') { 
                        str_id=document.getElementById(id3);
                        document.getElementById(id3).value = 'Not empty';
                        //alert("Not empty");  
                        str_id.focus();
                        str_id.select();
                    } else if(id4!=0) {
                        str = document.getElementById(id4).value;
                        if(str.length=='' || str=='Not empty') { 
                            str_id=document.getElementById(id4);
                            document.getElementById(id4).value = 'Not empty';  
                            //alert("Not empty");  
                            str_id.focus();
                            str_id.select();
                        } else if(id5!=0) {
                            str = document.getElementById(id5).value;
                            if(str.length=='' || str=='Not empty') { 
                                str_id=document.getElementById(id5);
                                document.getElementById(id5).value = 'Not empty';  
                                //alert("Not empty");  
                                str_id.focus();
                                str_id.select();
                            } else {
                                document.getElementById('save_pid').style.display='';
                            } 
                        }
                    }         
                }             
            }
        }
    }
}


function check_fields3(val_main, id_main, ff, ll, curr_id, id0, id2, id3, id4) {
    var str_ff=document.getElementById(ff).value;
    var str_ll=document.getElementById(ll).value;
    
    document.getElementById(id0).value=str_ff+' '+str_ll;
    
    si=document.getElementById(id_main).selectedIndex;
    vi = document.getElementById(id_main);
    
    //alert(vi.options[si].value);
    
    val_r = vi.options[si].value;
    if(val_r==val_main) {
        document.getElementById('save_pid').style.display='none';
    
        str1 = document.getElementById(id3).value;
        if(str1.length=='' || str1=='Not empty') {
            str_id1=document.getElementById(id3);
            //alert("Not empty"); 
            str_id1.value = 'Not empty' 
            str_id1.focus();
            str_id1.select();
        }  else {
            document.getElementById('save_pid').style.display='';
        }
        document.getElementById(curr_id).selectedIndex=1; 
    }  else {
        document.getElementById(curr_id).selectedIndex=0; 
    
        document.getElementById('save_pid').style.display='';
        document.getElementById(id0).value=''; 
        document.getElementById(id2).value='';
        document.getElementById(id3).value='';
        document.getElementById(id4).value='';
    }
}

function not_empty3(val_main, id_main, id1) {
    si=document.getElementById(id_main).selectedIndex;
    vi = document.getElementById(id_main);
    val_r = vi.options[si].value; 
    if(val_main==val_r) {
        if(id1!=0) {
            str = document.getElementById(id1).value;
            if(str.length=='' || str=='Not empty') { 
                str_id=document.getElementById(id1);
                document.getElementById(id1).value = 'Not empty';  
                //alert("Not empty");  
                str_id.focus();
                str_id.select();
            } else {
                document.getElementById('save_pid').style.display='';
            } 
        }
    }
}
  
     
// -->