//prices-pass allows you to hide pricing info on your page
//until a correct password is input then it swaps divs showing the hidden info.
function change()
 {
	var pword1 = 1;
	var pword2 = prompt('Please Enter Your Password',' '); 
//	var pword2 = prices; 
	if (pword2 != null) 
	{ while (pword1 < 3) 
		{
		if (!pword2) history.go(-1);
		if (pword2.toLowerCase() == 'prices', 'gethealthy', '245420', 'herbalife', 'rayva5', 'kc2527', 'alexandra', 'monkey57', '131766', 'larrysgirl', 'cafezowe', 'aubrey02', 'FRANCE2011', 'herbal', '616884427', 'auntsidney17', 'davidjason', 'a4vj2a', 'reggie5564', 'camaro1', 'coulter', 'queeny1406', 'nicbee', 'MCSEcool', 'marmie', 'babygirl', 'mackinac', 'weightloss', 'satnam19', 'lavera20', 'Sweazey22', '92411', 'cessna140', 'bobloisland', 'janelli08', 'ejd036', '3011green', 'mandy', 'donny33', 'JUANPENCA', 'lepper26', 'bangarang', 'mekhimekhi', 'justdee', 'minimoocelery', 'alliecat2', 'bandit', 'derby1', 'nicktony', 'lareina78', 'boocakey', 'Tahner15', 'jerusalem613', 'kylee5', 'Artstar1', 'Brendan', 'dingdong', 'mileyzion', 'inherb', 'basketball', 'lauriehealth', 'password', 'char1947les', 'bernard', 'holy3198mac', 'blue85', '3000gt', 'chispita12', '48sherry', '52651lamm', 'sassy01', 'lexie1857', 'chatterbox', 'claudia1010', 'q6n9igos', 'kerry1', 'Jakers', 'doniana7188', 'dourbest', 'my1stlove', 'david14g', '008744383', 'Pa55w0rd', 'Ellie1', 'bigdawg1', '27443Water', '8668664744', 'manning166', 'Boyergary1', 'jayjer', '3920gardie', 'katie1', 'love07', 'Trust1212', 'gthanson', 'annab2934', 'pancakes88', 'loumechie', 'philippi3992', 'pices316', 'sandy721', 'bogota08', 'rangerrick', 'tori1992', 'pandora29', 'cowboy', 'ssonch28794', 'Mcintyreos', 'praise2007', 'mike200', 'mikemel0323', 'daughter2', 'Vale1234', '10Herbifit', 'markita', 'Pchiang', 'pass1word', 'dldmswls123', 'Mariohull07', 'Michael07', 'tiger28', 'leonce77', 'julian062111', 'chaseroy', 'alie4501', 'mandi01', 'birm755608', 'gluten', 'MALISSACAL', 'jack2008', 'Mrsfukuto1', 'harley7', 'serenity2', '3920gardie', 'yulcar123', 'nathan20', 'clock5', 'marie1', 'cookies1101', 'herbalized', 'sanjujms', 'alex0407', 'marlas23', 'Vivitron15', 'garbear75', 'bugaboo', 'JudeLuke8', 'layla09', 'JAIDEND', 'Trytobethin', 'lily05', 'supa77', 'supa77', 'eg162128', 'st0rm1', 'vanessa', 'LIBIDO', 'JOANNA2800', 'atlantis',   'newme2012', 'diggy0000', 'herbal', '3920gardie', 'amapulapa1926', 'together-us4', 'angelic91', 'livewell', 'yourz4ever', 'cooper', 'skerry66', 'luxury23', 'Madelyn17', 'LOVEMYBOO624', 'mother', 'Brittany1', 'xzavier', 'Tattyisd1', 'Trustgod1', 'A2406$0602z') {pricing2();break;
		} 
		pword1+=1;
		var pword2 = prompt('Password Incorrect, Please Try Again.',' ');
	}
		} 
	if (pword1 !=null) {
		if (pword2.toLowerCase()!='password' + pword1 ==3) history.go(-1);return ' ';
		}
}


	 
function pricing2()
{	document.cookie="pword2=pword2;expires=Monday, 01-Jan-2030 00:00:00 GMT"
		changesDivs();
}

 // this function changes the price1 and price2 divs and the text1 text box
 function changesDivs(){
var arr1 = ["logina2", "pricea1", "pricea2", "pricea3", "pricea4", "pricea5", "pricea6", "pricea7", "pricea8", "pricea9", "pricea10", "pricea11", "pricea12"];
var arr2 = ["loginb2", "priceb1", "priceb2", "priceb3", "priceb4", "priceb5", "priceb6", "priceb7", "priceb8", "priceb9", "priceb10", "priceb11", "priceb12"];
        
		document.getElementById("inv1").style.display="none";
//		document.getElementById("login").style.display="none";
		for(var i = 0; i < arr1.length; i++)
        {
            document.getElementById(arr1[i]).style.display="none";
			document.getElementById(arr2[i]).style.display="inline";
//		document.getElementById("herbCat").style.display="none";
//		document.getElementById("herbCatPrices").style.display="inline";
		}
}

// this function checks for the presence of the correct cookie, if so, it changesDivs() 
function checks_forCookie(){
	if (document.cookie && document.cookie !="")
	//reads and splits the whole cookie, as there might be multiple cookies already set
	{	var whole_cookie = unescape(document.cookie);
		var each_cookie = whole_cookie.split(";");
		//this sorts the individual cookies and checks for the presence of the correct password
		for (i = 0; i < each_cookie.length; i++){
			if (each_cookie[i].indexOf("pword2=pword2") > -1 )
			{changesDivs()}

		}
	}
}

function noCookE(){
	var whole_cookie = unescape(document.cookie);

document.cookie = "pword2=pword2;expires=Monday, 04-Apr-2010 05:00:00 GMT" ;
}

