<!--

//********************************************************************

// VERSION	1.0

// CREATED	9/6/2009

// AUTHOR	jaideep(jd@tcc247.com)

// SUMMARY	This javascript function will validate the field of various forms

//********************************************************************





//Strip whitespace from the beginning and end of a string

//Input : a string

function affliatetype()

{

	alert ("You have login as User Please logout then try again");

	}



function trim(str)

{

    return str.replace(/^\s+|\s+$/g,'');

}



/*

Check if a string is in valid email format. 

Returns true if valid, false otherwise.

*/



function checkDomain(nname)

{

var arr = new Array(

'.com','.net','.org','.biz','.coop','.info','.museum','.name',

'.pro','.edu','.gov','.int','.mil','.ac','.ad','.ae','.af','.ag',

'.ai','.al','.am','.an','.ao','.aq','.ar','.as','.at','.au','.aw',

'.az','.ba','.bb','.bd','.be','.bf','.bg','.bh','.bi','.bj','.bm',

'.bn','.bo','.br','.bs','.bt','.bv','.bw','.by','.bz','.ca','.cc',

'.cd','.cf','.cg','.ch','.ci','.ck','.cl','.cm','.cn','.co','.cr',

'.cu','.cv','.cx','.cy','.cz','.de','.dj','.dk','.dm','.do','.dz',

'.ec','.ee','.eg','.eh','.er','.es','.et','.fi','.fj','.fk','.fm',

'.fo','.fr','.ga','.gd','.ge','.gf','.gg','.gh','.gi','.gl','.gm',

'.gn','.gp','.gq','.gr','.gs','.gt','.gu','.gv','.gy','.hk','.hm',

'.hn','.hr','.ht','.hu','.id','.ie','.il','.im','.in','.io','.iq',

'.ir','.is','.it','.je','.jm','.jo','.jp','.ke','.kg','.kh','.ki',

'.km','.kn','.kp','.kr','.kw','.ky','.kz','.la','.lb','.lc','.li',

'.lk','.lr','.ls','.lt','.lu','.lv','.ly','.ma','.mc','.md','.mg',

'.mh','.mk','.ml','.mm','.mn','.mo','.mp','.mq','.mr','.ms','.mt',

'.mu','.mv','.mw','.mx','.my','.mz','.na','.nc','.ne','.nf','.ng',

'.ni','.nl','.no','.np','.nr','.nu','.nz','.om','.pa','.pe','.pf',

'.pg','.ph','.pk','.pl','.pm','.pn','.pr','.ps','.pt','.pw','.py',

'.qa','.re','.ro','.rw','.ru','.sa','.sb','.sc','.sd','.se','.sg',

'.sh','.si','.sj','.sk','.sl','.sm','.sn','.so','.sr','.st','.sv',

'.sy','.sz','.tc','.td','.tf','.tg','.th','.tj','.tk','.tm','.tn',

'.to','.tp','.tr','.tt','.tv','.tw','.tz','.ua','.ug','.uk','.um',

'.us','.uy','.uz','.va','.vc','.ve','.vg','.vi','.vn','.vu','.ws',

'.wf','.ye','.yt','.yu','.za','.zm','.zw');



var mai = nname;

var val = true;



var dot = mai.lastIndexOf(".");

var dname = mai.substring(0,dot);

var ext = mai.substring(dot,mai.length);

//alert(ext);

	

if(dot>2 && dot<57)

{

	for(var i=0; i<arr.length; i++)

	{

	  if(ext == arr[i])

	  {

	 	val = true;

		break;

	  }	

	  else

	  {

	 	val = false;

	  }

	}

	if(val == false)

	{

	  	 // alert("Your domain extension "+ext+" is not correct");

		 return false;

	}

	else

	{

		for(var j=0; j<dname.length; j++)

		{

		  var dh = dname.charAt(j);

		  var hh = dh.charCodeAt(0);

		  if((hh > 47 && hh<59) || (hh > 64 && hh<91) || (hh > 96 && hh<123) || hh==45 || hh==46)

		  {

			 if((j==0 || j==dname.length-1) && hh == 45)	

		  	 {

		 	  	 // alert("Domain name should not begin are end with '-'");

			      return false;

		 	 }

		  }

		else	{

		  	 // alert("Your domain name should not have special characters");

			 return false;

		  }

		}

	}

}

else

{

 // alert("Your Domain name is too short/long");

 return false;

}	



return true;

}





function isEmail(str)

{

	// Should not beging with a '.' or '@'

	if(str.charAt(0)=='@' || str.charAt(0) == '.')

	{	

		return false;

	}



    var regex = /^[-_.a-z0-9]+@(([-_a-z0-9]+\.)+(ad|ae|aero|af|ag|ai|al|am|an|ao|aq|ar|arpa|as|at|au|aw|az|ba|bb|bd|be|bf|bg|bh|bi|biz|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|co|com|coop|cr|cs|cu|cv|cx|cy|cz|de|dj|dk|dm|do|dz|ec|edu|ee|eg|eh|er|es|et|eu|fi|fj|fk|fm|fo|fr|ga|gb|gd|ge|gf|gh|gi|gl|gm|gn|gov|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|in|info|int|io|iq|ir|is|it|jm|jo|jp|ke|kg|kh|ki|km|kn|kp|kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|mg|mh|mil|mk|ml|mm|mn|mo|mp|mq|mr|ms|mt|mu|museum|mv|mw|mx|my|mz|na|name|nc|ne|net|nf|ng|ni|nl|no|np|nr|nt|nu|nz|om|org|pa|pe|pf|pg|ph|pk|pl|pm|pn|pr|pro|ps|pt|pw|py|qa|re|ro|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|sk|sl|sm|sn|so|sr|st|su|sv|sy|sz|tc|td|tf|tg|th|tj|tk|tm|tn|to|tp|tr|tt|tv|tw|tz|ua|ug|uk|um|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|ye|yt|yu|za|zm|zw)|(([0-9][0-9]?|[0-1][0-9][0-9]|[2][0-4][0-9]|[2][5][0-5])\.){3}([0-9][0-9]?|[0-1][0-9][0-9]|[2][0-4][0-9]|[2][5][0-5]))$/i;

    return regex.test(str);

}



function isNumber(TheNumber) {

	var valid = 1

	var GoodChars = "-+0123456789"

	var i = 0

	if (TheNumber=="") {

		// Return false if number is empty

		valid = 0

	}

	for (i =0; i <= TheNumber.length -1; i++) {

		if (GoodChars.indexOf(TheNumber.charAt(i)) == -1) {

// Note: Remove the comments from the following line to see this

// for loop in action.

// alert(TheNumber.charAt(i) + " is no good.")

			valid = 0

		} // End if statement

	} // End for loop

	return valid

}	



function validateMultipleSelect(listObject) {



	// "listObject" is the object input array for the select 

	// list, referenced in the function call as "this.name", where

	// "name" is the name of the select list.

	// "numToSelect" is the number of items you allow to be selected.



	var j = 0;



	for (var i = 0; i < listObject.length; i++) {

		if (listObject.options[i].selected) {

			j++;

		}

	}

	

	if (j < 1)

	{

		return (false);

	} else {

		return (true);

	}

}



/////////////////////////////////////////  jai affiliate validation started ///////////////////////











/////////////////////////////////////////  jai affiliate validation end ///////////////////////





function createAccountForm()

{

	

var email_create;



	with(window.document.create_account_form)

    {

		cemail = email_create;

	}

	

	if(trim(cemail.value) == '')

    {

        alert('Please enter email address');

        cemail.focus();

        return false;

    }

	if(!isEmail(trim(cemail.value)))    {

        alert('Please enter valid email address');

        cemail.focus();

        return false;

    }

}







function contactForm()

{

	

var id_contact, from, message, code;



	with(window.document.contact_form)

    {

		cid_contact = id_contact;

		cemail = from;

		cmessage = message;

		ccode = code;

	}

	

	if(cid_contact.value == 0)

    {

        alert('Please select subject');

        cid_contact.focus();

        return false;

    }

	

	if(trim(cemail.value) == '')

    {

        alert('Please enter email address');

        cemail.focus();

        return false;

    }

	if(!isEmail(trim(cemail.value)))    {

        alert('Please enter valid email address');

        cemail.focus();

        return false;

    }

	if(trim(cmessage.value) == '')

    {

        alert('Please write message.');

        cmessage.focus();

        return false;

    }

	

	if(trim(ccode.value) == '')

    {

        alert('Please enter security code.');

        ccode.focus();

        return false;

    }

	

	if(ccode.value.length!=4)

    {

        alert('Security code length must be 4 character long.');

        ccode.focus();

        return false;

    }

}





function testimonialForm()

{

	

var name, description, logincode;



	with(window.document.testimonial)

    {

		cname = name;

		cdescription = description;

		clogincode = logincode;

	}

	

	if(trim(cname.value) == '')

    {

        alert('Please enter name.');

        cname.focus();

        return false;

    }

	

	if(trim(cdescription.value) == '')

    {

        alert('Please enter description.');

        cdescription.focus();

        return false;

    }

	

	if(trim(clogincode.value) == '')

    {

        alert('Please enter security code.');

        clogincode.focus();

        return false;

    }

	

	if(clogincode.value.length!=4)

    {

        alert('Security code length must be 4 character long.');

        clogincode.focus();

        return false;

    }

}



function addURLForm()

{

var urlfilter= /http:\/\/[A-Za-z0-9\.-]{3,}\.[A-Za-z]{3}/;	

var name, siteurl, urlto, content, logincode;



	with(window.document.addurl)

    {

		cname = name;

		csiteurl = siteurl;

		curlto = urlto;

		cdescription = content;

		clogincode = logincode;

	}

	

	if(trim(cname.value) == '')

    {

        alert('Please enter name.');

        cname.focus();

        return false;

    }

	if(trim(csiteurl.value) == '')

    {

        alert('Please enter siteurl.');

        csiteurl.focus();

        return false;

    }

	if(!urlfilter.test(csiteurl.value))

	{

		alert("Please Enter Website URL in this (https://www.BuyGenericRx.com) format.");

		csiteurl.focus();

		return false;

		}

	

	

	if(trim(curlto.value) == '')

    {

        alert('Please enter urlto.');

        curlto.focus();

        return false;

    }

	if(!urlfilter.test(curlto.value))

	{

		alert("Please Enter Website URL in this (https://www.BuyGenericRx.com) format.");

		curlto.focus();

		return false;

		}

	if(trim(cdescription.value) == '')

    {

        alert('Please enter description.');

        cdescription.focus();

        return false;

    }

	

	if(trim(clogincode.value) == '')

    {

        alert('Please enter security code.');

        clogincode.focus();

        return false;

    }

	

	if(clogincode.value.length!=4)

    {

        alert('Security code length must be 4 character long.');

        clogincode.focus();

        return false;

    }

}





function checkAuthenticateForm()

{

var email, passwd, logincode;



	with(window.document.login_form)

    {

		

		cemail = email;

		cpassword = passwd;

		clogincode = logincode;

	}

	

	if(trim(cemail.value) == '')

    {

        alert('Please enter email address');

        cemail.focus();

        return false;

    }

	if(!isEmail(trim(cemail.value)))    {

        alert('Please enter valid email address');

        cemail.focus();

        return false;

    }

	if(trim(cpassword.value) == '')

    {

        alert('Please enter password');

        cpassword.focus();

        return false;

    }

	

	if(cpassword.value.length<5)

    {

        alert('Password should be greater than 5.');

        cpassword.focus();

        return false;

    }

	if(trim(clogincode.value) == '')

    {

        alert('Please enter security code.');

        clogincode.focus();

        return false;

    }

	

	if(clogincode.value.length!=4)

    {

        alert('Security code length must be 4 character long.');

        clogincode.focus();

        return false;

    }

	

}



function checkRegisterForm()

{

var customer_firstname, customer_lastname, user_id, email, passwd, firstname, lastname, address1, postcode, city, id_country, alias, code;



	with(window.document.account_creation_form)

    {

		ccustomer_firstname = customer_firstname;

		ccustomer_lastname = customer_lastname;

		cuser_id = user_id;

		cemail = email;

		cpassword = passwd;

		

		cfirstname = firstname;

		clastname = lastname;

		caddress1 = address1;

		cpostcode = postcode;

		ccity = city;

		cid_country = id_country;

		calias = alias;

		ccode = code;

	}

	

	if(trim(ccustomer_firstname.value) == '')

    {

        alert('Please enter first name.');

        ccustomer_firstname.focus();

        return false;

    }

	if(trim(ccustomer_lastname.value) == '')

    {

        alert('Please enter last name.');

        ccustomer_lastname.focus();

        return false;

    }

	if(trim(cemail.value) == '')

    {

        alert('Please enter email address');

        cemail.focus();

        return false;

    }

	if(!isEmail(trim(cemail.value)))    {

        alert('Please enter valid email address');

        cemail.focus();

        return false;

    }

	if(trim(cuser_id.value) == '')

    {

        alert('Please enter User ID.');

        cuser_id.focus();

        return false;

    }

	if(trim(cpassword.value) == '')

    {

        alert('Please enter password');

        cpassword.focus();

        return false;

    }

	

	if(cpassword.value.length<5)

    {

        alert('Password should be greater than 5.');

        cpassword.focus();

        return false;

    }

	

	if(trim(cfirstname.value) == '')

    {

        alert('Please enter first name.');

        cfirstname.focus();

        return false;

    }

	

	if(trim(clastname.value) == '')

    {

        alert('Please enter last name.');

        clastname.focus();

        return false;

    }

	

	if(trim(caddress1.value) == '')

    {

        alert('Please enter address.');

        caddress1.focus();

        return false;

    }

	

	if(trim(cpostcode.value) == '')

    {

        alert('Please enter Postcode.');

        cpostcode.focus();

        return false;

    }

	if(cpostcode.value.length>6)

    {

        alert('Postcode maximum charater will not exceed more than 6.');

        cpostcode.focus();

        return false;

    }

	

	if(isNaN(cpostcode.value))

    {

        alert('Postcode should be numeric.');

        cpostcode.focus();

        return false;

    }

	

	if(trim(ccity.value) == '')

    {

        alert('Please enter city.');

        ccity.focus();

        return false;

    }

	

	if(trim(cid_country.value) == '')

    {

        alert('Please enter Postcode.');

        cid_country.focus();

        return false;

    }

	

	if(trim(calias.value) == '')

    {

        alert('Please enter address title for future.');

        calias.focus();

        return false;

    }

	

	if(trim(ccode.value) == '')

    {

        alert('Please enter security code.');

        ccode.focus();

        return false;

    }

	

	

	if(ccode.value.length!=4)

    {

        alert('Security code length must be 4 character long.');

        ccode.focus();

        return false;

    }

	

	

}











function checknewsForm()

{

var email;



	with(window.document.newsform)

    {

		

		cemail = email;

		

	}

	

	if(trim(cemail.value) == '')

    {

        alert('Please enter email address');

        cemail.focus();

        return false;

    }

	if(!isEmail(trim(cemail.value)))    {

        alert('Please enter valid email address');

        cemail.focus();

        return false;

    }

	

	

}





function forgotpass()

{

var email;



	with(window.document.forgotpassword)

    {

		

		cemail = email;

		

	}

	

	if(trim(cemail.value) == '')

    {

        alert('Please enter email address');

        cemail.focus();

        return false;

    }

	if(!isEmail(trim(cemail.value)))    {

        alert('Please enter valid email address');

        cemail.focus();

        return false;

    }

	

	

}





function sendtofriendvalidation()

{

var email;



	with(window.document.sendtofriend)

    {

		cname = name;

		cemail = email;

		

	}

	

	if(trim(cname.value) == '')

    {

        alert('Please enter name');

        cname.focus();

        return false;

    }

	if(trim(cemail.value) == '')

    {

        alert('Please enter email address');

        cemail.focus();

        return false;

    }

	if(!isEmail(trim(cemail.value)))    {

        alert('Please enter valid email address');

        cemail.focus();

        return false;

    }

	

	

}





function reordercheckbox(){

	var total=""

for(var i=0; i < document.reorderform.countre.value; i++){

if(document.reorderform.id_cart1[i].checked)

total +=document.form1.id_cart1[i].value + "\n"

}

if(total==""){

alert("Please check at least one order")

return false;

}

	}

function Check(chk)

{

if(document.reorderform.Check_ctr.checked==true){

for(var i=0; i < document.reorderform.countre.value; i++)

id_cart1[i].checked = true ;

}else{

for(var i=0; i < document.reorderform.countre.value; i++)

id_cart1[i].checked = false ;

}

}



function checkAll(flag, form, prefix) {

	if (!form)

		return;



	if (prefix)

		var reg = new RegExp("^"+prefix, "");

	for (var i = 0; i < form.elements.length; i++) {

		if (form.elements[i].type == "checkbox" && (!prefix || form.elements[i].name.search(reg) == 0) && !form.elements[i].disabled)

			form.elements[i].checked = flag;

	}

}



function checkaccounteditform(){

	if(document.account_creation_form.firstname.value==""){

			alert("Please enter your billing first name")

			document.account_creation_form.firstname.focus();

        return false;

			}

			if(document.account_creation_form.lastname.value==""){

			alert("Please enter your billing last name")

			document.account_creation_form.lastname.focus();

        return false;

			}

			if(document.account_creation_form.address1.value==""){

			alert("Please enter your billing address1")

			document.account_creation_form.address1.focus();

        return false;

			}

			

			if(document.account_creation_form.postcode.value==""){

			alert("Please enter your billing postcode")

			document.account_creation_form.postcode.focus();

        return false;

			}

			if(document.account_creation_form.city.value==""){

			alert("Please enter your billing city")

			document.account_creation_form.city.focus();

        return false;

			}

			if((document.account_creation_form.id_country.value==21)||(document.account_creation_form.id_country.value==4)||(document.account_creation_form.id_country.value==35)||(document.account_creation_form.id_country.value==149)||(document.account_creation_form.id_country.value==27)||(document.account_creation_form.id_country.value==17)||(document.account_creation_form.id_country.value==72)){

			 if(document.account_creation_form.id_state.value==""){

			alert("Please select billing state")

			document.account_creation_form.id_state.focus();

        return false;

			}

			}

			if(document.account_creation_form.id_country.value==""){

			alert("Please select billing country")

			document.account_creation_form.id_country.focus();

        return false;

			}

			if(document.account_creation_form.phone.value==""){

			alert("Please enter phone number")

			document.account_creation_form.phone.focus();

        return false;

			}

			}





//open popup for old site msg



<!--

function toggleDiv(id,flagit) {

if (flagit=="1"){

if (document.layers) document.layers[''+id+''].visibility = "show"

else if (document.all) document.all[''+id+''].style.visibility = "visible"

else if (document.getElementById) document.getElementById(''+id+'').style.visibility = "visible"

}

else

if (flagit=="0"){

if (document.layers) document.layers[''+id+''].visibility = "hide"

else if (document.all) document.all[''+id+''].style.visibility = "hidden"

else if (document.getElementById) document.getElementById(''+id+'').style.visibility = "hidden"

}

}

//-->



//contact
function contact()
{
var name, email, query, pr, order, product, code;

	with(window.document.contact_form)
    {
		cname = name;
		cemail = email;
		cpr  = pr;
		cproduct  = product;
		corder = order
		cquery = query;
		ccode = code;
	}
	
	if(cname.value == '')
    {
        alert('Please enter name');
        cname.focus();
        return false;
    }
	
	if(trim(cemail.value) == '')
    {
        alert('Please enter email address');
        cemail.focus();
        return false;
    }
	if(!isEmail(trim(cemail.value)))    {
        alert('Please enter valid email address');
        cemail.focus();
        return false;
    }
	if(cpr.value == 'yes')
    {
	if(trim(cproduct.value) == '')
    {
        alert('Please write product name.');
        cproduct.focus();
        return false;
    }
	}
	if(cpr.value == 'yeso')
    {
	if(trim(corder.value) == '')
    {
        alert('Please write your order number.');
        corder.focus();
        return false;
    }
	}
	
	
	if(trim(cquery.value) == '')
    {
        alert('Please write query.');
        cquery.focus();
        return false;
    }
	
	if(trim(ccode.value) == '')
    {
        alert('Please enter security code.');
        ccode.focus();
        return false;
    }
	
	if(ccode.value.length!=4)
    {
        alert('Security code length must be 4 character long.');
        ccode.focus();
        return false;
    }
}



//order Status



function orderstatus()

{

	var orderfilter = /^[0-9]+$/; 

var order, from;



	with(window.document.contact_form)

    {

		corder = order;

		cemail = from;

		}

	

	if(corder.value == '')

    {

        alert('Please enter Order Number');

        corder.focus();

        return false;

    }

	if(!orderfilter.test(corder.value)) 

	    {

        alert('Please enter correct Order Number');

        corder.focus();

        return false;

    }

	

	

	

	if(trim(cemail.value) == '')

    {

        alert('Please enter email address');

        cemail.focus();

        return false;

    }

	if(!isEmail(trim(cemail.value)))    {

        alert('Please enter valid email address');

        cemail.focus();

        return false;

    }

	

}



// medicinessearch

function medicinessearch()

{

	if(document.contact_form.name.value == '')

    {

        alert('Please enter name');

        document.contact_form.name.focus();

        return false;

    }

	

	if(trim(document.contact_form.from.value) == '')

    {



        alert('Please enter email address');

       document.contact_form.from.focus();

        return false;

    }

	if(!isEmail(trim(document.contact_form.from.value)))    {

        alert('Please enter valid email address');

       document.contact_form.from.focus();

        return false;

    }

	if(trim(document.contact_form.productname.value) == '')

    {

        alert('Please write Product Name.');

        document.contact_form.productname.focus();

        return false;

    }

	

	if(trim(document.contact_form.code.value) == '')

    {

        alert('Please enter security code.');

        document.contact_form.code.focus();

        return false;

    }

	

	if(document.contact_form.code.value.length!=4)

    {

        alert('Security code length must be 4 character long.');

        document.contact_form.code.focus();

        return false;

    }

}



//customersupport

function customersupport()

{

	var orderfilter = /^[0-9]+$/; 

var name, from, order, message, code;



	with(window.document.contact_form)

    {

		cname = name;

		cemail = from;

		corder = order;

		cmessage = message;

		ccode = code;

	}

	

	if(cname.value == '')

    {

        alert('Please enter name');

        cname.focus();

        return false;

    }

	

	if(trim(cemail.value) == '')

    {

        alert('Please enter email address');

        cemail.focus();

        return false;

    }

	if(!isEmail(trim(cemail.value)))    {

        alert('Please enter valid email address');

        cemail.focus();

        return false;

    }

	if(corder.value == '')

    {

        alert('Please enter order');

        corder.focus();

        return false;

    }

	if(!orderfilter.test(corder.value)) 

	    {

        alert('Please enter correct Order Number');

        corder.focus();

        return false;

    }

	if(trim(cmessage.value) == '')

    {

        alert('Please write query.');

        cmessage.focus();

        return false;

    }

	

	if(trim(ccode.value) == '')

    {

        alert('Please enter security code.');

        ccode.focus();

        return false;

    }

	

	if(ccode.value.length!=4)

    {

        alert('Security code length must be 4 character long.');

        ccode.focus();

        return false;

    }

}





//quickmessage

function quickmessage()

{

var name, from, message, code;



	with(window.document.contact_form)

    {

		cname = name;

		cemail = from;

		cmessage = message;

		ccode = code;

	}

	

	if(cname.value == '')

    {

        alert('Please enter name');

        cname.focus();

        return false;

    }

	

	if(trim(cemail.value) == '')

    {

        alert('Please enter email address');

        cemail.focus();

        return false;

    }

	if(!isEmail(trim(cemail.value)))    {

        alert('Please enter valid email address');

        cemail.focus();

        return false;

    }

	if(trim(cmessage.value) == '')

    {

        alert('Please write your query.');

        cmessage.focus();

        return false;

    }

	

	if(trim(ccode.value) == '')

    {

        alert('Please enter security code.');

        ccode.focus();

        return false;

    }

	

	if(ccode.value.length!=4)

    {

        alert('Security code length must be 4 character long.');

        ccode.focus();

        return false;

    }

}



<!-- BEGIN LivePerson Monitor. -->

 var lpMTagConfig = {'lpServer' : "server.iad.liveperson.net",'lpNumber' : "82521976",'lpProtocol' : "https"}; function lpAddMonitorTag(src){if(typeof(src)=='undefined'||typeof(src)=='object'){src=lpMTagConfig.lpMTagSrc?lpMTagConfig.lpMTagSrc:'/hcp/html/mTag.js';}if(src.indexOf('https')!=0){src=lpMTagConfig.lpProtocol+"://"+lpMTagConfig.lpServer+src+'?site='+lpMTagConfig.lpNumber;}else{if(src.indexOf('site=')<0){if(src.indexOf('?')<0)src=src+'?';else src=src+'&';src=src+'site='+lpMTagConfig.lpNumber;}};var s=document.createElement('script');s.setAttribute('type','text/javascript');s.setAttribute('charset','iso-8859-1');s.setAttribute('src',src);document.getElementsByTagName('head').item(0).appendChild(s);} if (window.attachEvent) window.attachEvent('onload',lpAddMonitorTag); else window.addEventListener("load",lpAddMonitorTag,false);<!-- END LivePerson Monitor. -->

<!-- BEGIN Monitor Tracking Variables  -->



if (typeof(lpMTagConfig.sessionVar) == "undefined"){ lpMTagConfig.sessionVar = new Array();}

lpMTagConfig.sessionVar[lpMTagConfig.sessionVar.length] = 'opid=2';

lpMTagConfig.sessionVar[lpMTagConfig.sessionVar.length] = 'skill=buygenericrx';



<!-- End Monitor Tracking Variables  -->

/*for change password*/
		function checkidentity(){
			var passwordfilterupper=/([A-Z])/;
            var passwordfilterlower=/([a-z])/;
            var passwordfilternumber=/([0-9])/;
			if(document.identity.firstname.value==""){
			alert("Please enter first name")
			document.identity.firstname.focus();
        return false;
			}
			if(document.identity.lastname.value==""){
			alert("Please enter last name")
			document.identity.lastname.focus();
        return false;
			}
			if(document.identity.email.value==""){
			alert("Please enter email address")
			document.identity.email.focus();
        return false;
			}
			
			if(document.identity.passwd.value!=""){
				if(document.identity.old_passwd.value==""){
			alert("Please enter your current password")
			document.identity.old_passwd.focus();
        return false;
			}
				
			if(document.identity.passwd.value.length<8){
            alert("Use 8 to 14 characters.Mix upper case,lower case alphabets and a number.")
            document.identity.passwd.focus();
             return false;
              }if(document.identity.passwd.value.length>14){
            alert("Use 8 to 14 characters.Mix upper case,lower case alphabets and a number.")
            document.identity.passwd.focus();
             return false;
              }
if(!passwordfilterupper.test(document.identity.passwd.value)) 
{
  alert("Please enter uppercase letter also");
  document.identity.passwd.focus();
  return false;
 }if(!passwordfilterlower.test(document.identity.passwd.value)) 
{
  alert("Please enter lowercase letter also");
  document.identity.passwd.focus();
  return false;
 }
 if(!passwordfilternumber.test(document.identity.passwd.value)) 
{
  alert("Please enter number also");
  document.identity.passwd.focus();
  return false;
 }
	if(document.identity.passwd.value!=document.identity.confirmation.value){
			alert("Confirmation password does not match")
			document.identity.confirmation.focus();
        return false;
			}		
			}
	}
//-->










<!-- BEGIN LivePerson Monitor. -->



var lpMTagConfig = {'lpServer' : "server.iad.liveperson.net",'lpNumber' : "82521976",'lpProtocol' : "https"}; function lpAddMonitorTag(src){if(typeof(src)=='undefined'||typeof(src)=='object'){src=lpMTagConfig.lpMTagSrc?lpMTagConfig.lpMTagSrc:'/hcp/html/mTag.js';}if(src.indexOf('https')!=0){src=lpMTagConfig.lpProtocol+"://"+lpMTagConfig.lpServer+src+'?site='+lpMTagConfig.lpNumber;}else{if(src.indexOf('site=')<0){if(src.indexOf('?')<0)src=src+'?';else src=src+'&';src=src+'site='+lpMTagConfig.lpNumber;}};var s=document.createElement('script');s.setAttribute('type','text/javascript');s.setAttribute('charset','iso-8859-1');s.setAttribute('src',src);document.getElementsByTagName('head').item(0).appendChild(s);} if (window.attachEvent) window.attachEvent('onload',lpAddMonitorTag); else window.addEventListener("load",lpAddMonitorTag,false);<!-- END LivePerson Monitor. -->



<!-- BEGIN Monitor Tracking Variables  -->







if (typeof(lpMTagConfig.sessionVar) == "undefined"){ lpMTagConfig.sessionVar = new Array();}



lpMTagConfig.sessionVar[lpMTagConfig.sessionVar.length] = 'opid=2';



lpMTagConfig.sessionVar[lpMTagConfig.sessionVar.length] = 'skill=buygenericrx';





<!-- End Monitor Tracking Variables  -->






