function trim(text){
	text = text.replace(/^\s+/, "");
	text = text.replace(/\s+$/, "");
	text = text.replace(/\s+/g, " ");
	return text;
}

function transportMe(strID){
	new Effect.ScrollTo(strID, {offset: -24});
}

function bookmarksite(title, url){
if (document.all)
window.external.AddFavorite(url, title);
else if (window.sidebar)
window.sidebar.addPanel(title, url, "")
}



function constructBars(intNum, strURL, intTotal){
	var strBars = "";
	
	switch (intNum){
		case 1: 
			switch (intTotal){
				case 5: strBars = '<img src="' + strURL + 'graphics/elements/bar_1.jpg" alt="" title="" />';break;
				case 10: strBars = '<img src="' + strURL + 'graphics/elements/bar_1.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_0.jpg" alt="" title="" />';break;
				case 15: strBars = '<img src="' + strURL + 'graphics/elements/bar_1.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_0.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_0.jpg" alt="" title="" />';break;
				case 20: strBars = '<img src="' + strURL + 'graphics/elements/bar_1.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_0.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_0.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_0.jpg" alt="" title="" />';break;
				case 25: strBars = '<img src="' + strURL + 'graphics/elements/bar_1.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_0.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_0.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_0.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_0.jpg" alt="" title="" />';break;
			}
			break;
		case 2: 
			switch (intTotal){
				case 5: strBars = '<img src="' + strURL + 'graphics/elements/bar_2.jpg" alt="" title="" />';break;
				case 10: strBars = '<img src="' + strURL + 'graphics/elements/bar_2.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_0.jpg" alt="" title="" />';break;
				case 15: strBars = '<img src="' + strURL + 'graphics/elements/bar_2.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_0.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_0.jpg" alt="" title="" />';break;
				case 20: strBars = '<img src="' + strURL + 'graphics/elements/bar_2.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_0.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_0.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_0.jpg" alt="" title="" />';break;
				case 25: strBars = '<img src="' + strURL + 'graphics/elements/bar_2.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_0.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_0.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_0.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_0.jpg" alt="" title="" />';break;
			}
			break;
		case 3: 
			switch (intTotal){
				case 5: strBars = '<img src="' + strURL + 'graphics/elements/bar_3.jpg" alt="" title="" />';break;
				case 10: strBars = '<img src="' + strURL + 'graphics/elements/bar_3.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_0.jpg" alt="" title="" />';break;
				case 15: strBars = '<img src="' + strURL + 'graphics/elements/bar_3.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_0.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_0.jpg" alt="" title="" />';break;
				case 20: strBars = '<img src="' + strURL + 'graphics/elements/bar_3.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_0.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_0.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_0.jpg" alt="" title="" />';break;
				case 25: strBars = '<img src="' + strURL + 'graphics/elements/bar_3.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_0.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_0.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_0.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_0.jpg" alt="" title="" />';break;
			}
			break;
		case 4: 
			switch (intTotal){
				case 5: strBars = '<img src="' + strURL + 'graphics/elements/bar_4.jpg" alt="" title="" />';break;
				case 10: strBars = '<img src="' + strURL + 'graphics/elements/bar_4.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_0.jpg" alt="" title="" />';break;
				case 15: strBars = '<img src="' + strURL + 'graphics/elements/bar_4.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_0.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_0.jpg" alt="" title="" />';break;
				case 20: strBars = '<img src="' + strURL + 'graphics/elements/bar_4.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_0.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_0.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_0.jpg" alt="" title="" />';break;
				case 25: strBars = '<img src="' + strURL + 'graphics/elements/bar_4.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_0.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_0.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_0.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_0.jpg" alt="" title="" />';break;
			}
			break;
		case 5: 
			switch (intTotal){
				case 5: strBars = '<img src="' + strURL + 'graphics/elements/bar_5.jpg" alt="" title="" />';break;
				case 10: strBars = '<img src="' + strURL + 'graphics/elements/bar_5.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_0.jpg" alt="" title="" />';break;
				case 15: strBars = '<img src="' + strURL + 'graphics/elements/bar_5.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_0.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_0.jpg" alt="" title="" />';break;
				case 20: strBars = '<img src="' + strURL + 'graphics/elements/bar_5.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_0.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_0.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_0.jpg" alt="" title="" />';break;
				case 25: strBars = '<img src="' + strURL + 'graphics/elements/bar_5.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_0.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_0.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_0.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_0.jpg" alt="" title="" />';break;
			}
			break;
		
		
		
		
		case 6: 
			switch (intTotal){
				case 10: strBars = '<img src="' + strURL + 'graphics/elements/bar_5.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_1.jpg" alt="" title="" />';break;
				case 15: strBars = '<img src="' + strURL + 'graphics/elements/bar_5.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_1.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_0.jpg" alt="" title="" />';break;
				case 20: strBars = '<img src="' + strURL + 'graphics/elements/bar_5.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_1.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_0.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_0.jpg" alt="" title="" />';break;
				case 25: strBars = '<img src="' + strURL + 'graphics/elements/bar_5.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_1.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_0.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_0.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_0.jpg" alt="" title="" />';break;
			}
			break;
		
		case 7: 
			switch (intTotal){
				case 10: strBars = '<img src="' + strURL + 'graphics/elements/bar_5.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_2.jpg" alt="" title="" />';break;
				case 15: strBars = '<img src="' + strURL + 'graphics/elements/bar_5.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_2.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_0.jpg" alt="" title="" />';break;
				case 20: strBars = '<img src="' + strURL + 'graphics/elements/bar_5.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_2.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_0.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_0.jpg" alt="" title="" />';break;
				case 25: strBars = '<img src="' + strURL + 'graphics/elements/bar_5.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_2.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_0.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_0.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_0.jpg" alt="" title="" />';break;
			}
			break;
			
		case 8: 
			switch (intTotal){
				case 10: strBars = '<img src="' + strURL + 'graphics/elements/bar_5.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_3.jpg" alt="" title="" />';break;
				case 15: strBars = '<img src="' + strURL + 'graphics/elements/bar_5.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_3.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_0.jpg" alt="" title="" />';break;
				case 20: strBars = '<img src="' + strURL + 'graphics/elements/bar_5.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_3.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_0.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_0.jpg" alt="" title="" />';break;
				case 25: strBars = '<img src="' + strURL + 'graphics/elements/bar_5.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_3.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_0.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_0.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_0.jpg" alt="" title="" />';break;
			}
			break;
			
		case 9: 
			switch (intTotal){
				case 10: strBars = '<img src="' + strURL + 'graphics/elements/bar_5.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_4.jpg" alt="" title="" />';break;
				case 15: strBars = '<img src="' + strURL + 'graphics/elements/bar_5.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_4.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_0.jpg" alt="" title="" />';break;
				case 20: strBars = '<img src="' + strURL + 'graphics/elements/bar_5.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_4.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_0.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_0.jpg" alt="" title="" />';break;
				case 25: strBars = '<img src="' + strURL + 'graphics/elements/bar_5.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_4.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_0.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_0.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_0.jpg" alt="" title="" />';break;
			}
			break;
			
		case 10: 
			switch (intTotal){
				case 10: strBars = '<img src="' + strURL + 'graphics/elements/bar_5.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_5.jpg" alt="" title="" />';break;
				case 15: strBars = '<img src="' + strURL + 'graphics/elements/bar_5.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_5.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_0.jpg" alt="" title="" />';break;
				case 20: strBars = '<img src="' + strURL + 'graphics/elements/bar_5.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_5.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_0.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_0.jpg" alt="" title="" />';break;
				case 25: strBars = '<img src="' + strURL + 'graphics/elements/bar_5.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_5.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_0.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_0.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_0.jpg" alt="" title="" />';break;
			}
			break;
		
		
		
		
		
		
		case 11: 
			switch (intTotal){
				
				case 15: strBars = '<img src="' + strURL + 'graphics/elements/bar_5.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_5.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_1.jpg" alt="" title="" />';break;
				case 20: strBars = '<img src="' + strURL + 'graphics/elements/bar_5.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_5.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_1.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_0.jpg" alt="" title="" />';break;
				case 25: strBars = '<img src="' + strURL + 'graphics/elements/bar_5.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_5.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_1.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_0.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_0.jpg" alt="" title="" />';break;
			}
			break;
		
		case 12: 
			switch (intTotal){
				
				case 15: strBars = '<img src="' + strURL + 'graphics/elements/bar_5.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_5.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_2.jpg" alt="" title="" />';break;
				case 20: strBars = '<img src="' + strURL + 'graphics/elements/bar_5.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_5.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_2.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_0.jpg" alt="" title="" />';break;
				case 25: strBars = '<img src="' + strURL + 'graphics/elements/bar_5.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_5.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_2.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_0.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_0.jpg" alt="" title="" />';break;
			}
			break;
			
		case 13: 
			switch (intTotal){
				
				case 15: strBars = '<img src="' + strURL + 'graphics/elements/bar_5.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_5.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_3.jpg" alt="" title="" />';break;
				case 20: strBars = '<img src="' + strURL + 'graphics/elements/bar_5.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_5.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_3.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_0.jpg" alt="" title="" />';break;
				case 25: strBars = '<img src="' + strURL + 'graphics/elements/bar_5.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_5.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_3.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_0.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_0.jpg" alt="" title="" />';break;
			}
			break;
			
		case 14: 
			switch (intTotal){
				
				case 15: strBars = '<img src="' + strURL + 'graphics/elements/bar_5.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_5.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_4.jpg" alt="" title="" />';break;
				case 20: strBars = '<img src="' + strURL + 'graphics/elements/bar_5.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_5.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_4.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_0.jpg" alt="" title="" />';break;
				case 25: strBars = '<img src="' + strURL + 'graphics/elements/bar_5.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_5.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_4.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_0.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_0.jpg" alt="" title="" />';break;
			}
			break;
			
		case 15: 
			switch (intTotal){
		
				case 15: strBars = '<img src="' + strURL + 'graphics/elements/bar_5.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_5.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_5.jpg" alt="" title="" />';break;
				case 20: strBars = '<img src="' + strURL + 'graphics/elements/bar_5.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_5.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_5.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_0.jpg" alt="" title="" />';break;
				case 25: strBars = '<img src="' + strURL + 'graphics/elements/bar_5.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_5.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_5.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_0.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_0.jpg" alt="" title="" />';break;
			}
			break;
			
			
			
			
			
			
			
		case 16: 
			switch (intTotal){
				
				case 20: strBars = '<img src="' + strURL + 'graphics/elements/bar_5.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_5.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_5.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_1.jpg" alt="" title="" />';break;
				case 25: strBars = '<img src="' + strURL + 'graphics/elements/bar_5.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_5.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_5.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_1.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_0.jpg" alt="" title="" />';break;
			}
			break;
		
		case 17: 
			switch (intTotal){
				
				case 20: strBars = '<img src="' + strURL + 'graphics/elements/bar_5.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_5.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_5.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_2.jpg" alt="" title="" />';break;
				case 25: strBars = '<img src="' + strURL + 'graphics/elements/bar_5.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_5.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_5.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_2.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_0.jpg" alt="" title="" />';break;
			}
			break;
			
		case 18: 
			switch (intTotal){
				
				case 20: strBars = '<img src="' + strURL + 'graphics/elements/bar_5.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_5.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_5.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_3.jpg" alt="" title="" />';break;
				case 25: strBars = '<img src="' + strURL + 'graphics/elements/bar_5.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_5.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_5.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_3.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_0.jpg" alt="" title="" />';break;
			}
			break;
			
		case 19: 
			switch (intTotal){
				
				case 20: strBars = '<img src="' + strURL + 'graphics/elements/bar_5.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_5.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_5.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_4.jpg" alt="" title="" />';break;
				case 25: strBars = '<img src="' + strURL + 'graphics/elements/bar_5.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_5.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_5.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_4.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_0.jpg" alt="" title="" />';break;
			}
			break;
			
		case 20: 
			switch (intTotal){
				
				case 20: strBars = '<img src="' + strURL + 'graphics/elements/bar_5.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_5.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_5.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_5.jpg" alt="" title="" />';break;
				case 25: strBars = '<img src="' + strURL + 'graphics/elements/bar_5.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_5.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_5.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_5.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_0.jpg" alt="" title="" />';break;
			}
			break;
			
			
			
			
			
			
		case 21: 
			switch (intTotal){
				
				case 25: strBars = '<img src="' + strURL + 'graphics/elements/bar_5.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_5.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_5.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_5.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_1.jpg" alt="" title="" />';break;
			}
			break;
			
		case 22: 
			switch (intTotal){
				
				case 25: strBars = '<img src="' + strURL + 'graphics/elements/bar_5.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_5.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_5.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_5.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_2.jpg" alt="" title="" />';break;
			}
			break;
			
		case 23: 
			switch (intTotal){
				
				case 25: strBars = '<img src="' + strURL + 'graphics/elements/bar_5.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_5.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_5.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_5.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_3.jpg" alt="" title="" />';break;
			}
			break;
			
		case 24: 
			switch (intTotal){
				
				case 25: strBars = '<img src="' + strURL + 'graphics/elements/bar_5.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_5.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_5.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_5.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_4.jpg" alt="" title="" />';break;
			}
			break;
			
		case 25: 
			switch (intTotal){
				
				case 25: strBars = '<img src="' + strURL + 'graphics/elements/bar_5.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_5.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_5.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_5.jpg" alt="" title="" /><img src="' + strURL + 'graphics/elements/bar_5.jpg" alt="" title="" />';break;
			}
			break;
		
	}
	
	$('bars_content').innerHTML = strBars;
}


function checkSurForm(){

	var objForm = document.getElementById("surForm");
	
	if(!objForm.tick_annonymous.checked){
	
		if (trim(objForm.frm_first.value).length < 2){
			alert("Please enter your first name.");
			objForm.frm_first.value = trim(objForm.frm_first.value);
			objForm.frm_first.focus();
			return false;
		}
		
		if (trim(objForm.frm_last.value).length < 2){
			alert("Please enter your last name.");
			objForm.frm_last.value = trim(objForm.frm_last.value);
			objForm.frm_last.focus();
			return false;
		}
		
		if (!(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(trim(objForm.frm_email.value)))){
			alert("Please enter a valid email address for yourself.");
			objForm.frm_email.value = trim(objForm.frm_email.value);
			objForm.frm_email.focus();
			return false;
		}
		
		if (trim(objForm.text_address.value).length < 2){
			alert("Please enter your address.");
			objForm.text_address.value = trim(objForm.text_address.value);
			objForm.text_address.focus();
			return false;
		}
		
		if (trim(objForm.frm_postcode.value).length < 2){
			alert("Please enter your postal code.");
			objForm.frm_postcode.value = trim(objForm.frm_postcode.value);
			objForm.frm_postcode.focus();
			return false;
		}
		
		if (trim(objForm.frm_telephone.value).length < 2){
			alert("Please enter your telephone number.");
			objForm.frm_telephone.value = trim(objForm.frm_telephone.value);
			objForm.frm_telephone.focus();
			return false;
		}
	
	}
	
	return true;
	
}





function step_1(){

	var objForm = document.getElementById("stepForm");
	
	if (trim(objForm.frm_first.value).length < 2){
		alert("Please enter your first name.");
		objForm.frm_first.value = trim(objForm.frm_first.value);
		objForm.frm_first.focus();
		return false;
	}
	
	if (trim(objForm.frm_last.value).length < 2){
		alert("Please enter your last name.");
		objForm.frm_last.value = trim(objForm.frm_last.value);
		objForm.frm_last.focus();
		return false;
	}
	
	if (trim(objForm.frm_company.value).length < 2){
		alert("Please enter your company name.");
		objForm.frm_company.value = trim(objForm.frm_company.value);
		objForm.frm_company.focus();
		return false;
	}
	
	if (trim(objForm.text_address.value).length < 2){
		alert("Please enter your address.");
		objForm.text_address.value = trim(objForm.text_address.value);
		objForm.text_address.focus();
		return false;
	}
	
	if (trim(objForm.frm_postcode.value).length < 2){
		alert("Please enter your postal code.");
		objForm.frm_postcode.value = trim(objForm.frm_postcode.value);
		objForm.frm_postcode.focus();
		return false;
	}
	
	if (trim(objForm.frm_telephone.value).length < 2){
		alert("Please enter your telephone number.");
		objForm.frm_telephone.value = trim(objForm.frm_telephone.value);
		objForm.frm_telephone.focus();
		return false;
	}
	
	if (!(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(trim(objForm.frm_username.value)))){
		alert("Please enter a valid email address (username) for yourself.");
		objForm.frm_username.value = trim(objForm.frm_username.value);
		objForm.frm_username.focus();
		return false;
	}
	
	if (trim(objForm.frm_password.value).length < 2){
		alert("Please enter your desired password.");
		objForm.frm_password.value = trim(objForm.frm_password.value);
		objForm.frm_password.focus();
		return false;
	}
	
	if (trim(objForm.frm_retype.value).length < 2){
		alert("Please retype your password.");
		objForm.frm_retype.value = trim(objForm.frm_retype.value);
		objForm.frm_retype.focus();
		return false;
	}
	
	if (trim(objForm.frm_retype.value) != trim(objForm.frm_password.value)){
		alert("Please ensure that your passwords match.");
		objForm.frm_retype.focus();
		return false;
	}
	
	new Ajax.Request('code/includes/step_1.asp?_r=' + Math.random(), {method: 'post', parameters: $('stepForm').serialize(true), evalScripts: true, onComplete: step_1_callback});
	
}
		
function step_1_callback(transport){

	response = transport.responseText;
	
	if (response == "ok"){
		window.location.href = "get_started_2.asp";
	}else if(response == "company"){
		$('alertContentsFeed').innerHTML = 'The specified company already exists.';
	}else if(response == "email"){
		$('alertContentsFeed').innerHTML = 'The specified email already exists.';
	}else{
		$('alertContentsFeed').innerHTML = response;
	}
	
}



function surveyNext(){

	new Ajax.Request('code/includes/survey_next_step.asp?_r=' + Math.random(), {method: 'post', parameters: $('survey__form').serialize(true), evalScripts: true, onComplete: surveyNextCallback});	

}
function surveyNextCallback(transport){

	response = transport.responseText;
	
	// If response is URL, then done
	
	
	
	if(response.length > 5){
		window.location.href=response + "/done";
	}else{
		loadQuestions(response);
	}
	
}



function step_2(){

	var objForm = document.getElementById("stepForm");
	
	if (trim(objForm.frm_exhibition.value).length < 2){
		alert("Please enter the exhibition name.");
		objForm.frm_exhibition.value = trim(objForm.frm_exhibition.value);
		objForm.frm_exhibition.focus();
		return false;
	}
	
	if (trim(objForm.frm_stand.value).length < 2){
		alert("Please enter your stand number or name.");
		objForm.frm_stand.value = trim(objForm.frm_stand.value);
		objForm.frm_stand.focus();
		return false;
	}
	
	if (trim(objForm.frm_venue.value).length < 2){
		alert("Please enter the name of the venue.");
		objForm.frm_venue.value = trim(objForm.frm_venue.value);
		objForm.frm_venue.focus();
		return false;
	}
	
	if (objForm.country.selectedIndex == 0){
		alert("Please select a country.");
		objForm.country.focus();
		return false;
	}
	
	/*if (objForm.city.selectedIndex == 0){
		alert("Please select a city.");
		objForm.city.focus();
		return false;
	}*/
	
	if (trim(objForm.datepick.value).length < 2){
		alert("Please select the survey start date.");
		return false;
	}
	
	new Ajax.Request('code/includes/step_2.asp?_r=' + Math.random(), {method: 'post', parameters: $('stepForm').serialize(true), evalScripts: true, onComplete: step_2_callback});
	
}
		
function step_2_callback(transport){

	response = transport.responseText;
	
	
	
	if (response.substring(0,2) == "ok"){
		
		intPurchaseID = response.split("_")[1];
		intSurveyID = response.split("_")[2];
		intPlanTaken = response.split("_")[3];
		
		var strPlanName = ""
		var strPlanPrice = ""
		
		switch("" + intPlanTaken + ""){
			case "1": 
					strPlanName = "TradeShow Spy - Single Survey"
					strPlanPrice = "49.00"
					break;
			case "2": 
					strPlanName = "TradeShow Spy - 3 for 2"
					strPlanPrice = "99.00"
					break;
			case "3": 
					strPlanName = "TradeShow Spy - MI5"
					strPlanPrice = "149.00"
					break;
		}
		
		$('ppf').item_name.value = strPlanName;
		$('ppf').amount.value = strPlanPrice;
		$('ppf').custom.value = "PUR" + intPurchaseID + "_SUR" + intSurveyID;
		
		$('ppf').submit();
		
	}else if (response == "exists"){
		$('alertContentsFeed').innerHTML = 'The exhibition for your company already exists.';
	}else{
		$('alertContentsFeed').innerHTML = response;//'An error occurred. Please contact us.';
	}
	
}











function addQuestion(){

	var objForm = document.getElementById("qForm");
	
	if(!objForm.tick_ownquestion.checked){
		if (objForm.cat.selectedIndex == 0){
			alert("Please select a category.");
			objForm.cat.focus();
			return false;
		}
		
		if (objForm.question.selectedIndex == 0){
			alert("Please select a question.");
			objForm.question.focus();
			return false;
		}
	}
	
	
	
	new Ajax.Request('code/includes/q_add_edit.asp?_r=' + Math.random(), {method: 'post', parameters: $('qForm').serialize(true), evalScripts: true, onComplete: refreshQuestionList});
	
}

function refreshQuestionList(transport){
	// Refresh list
	response = transport.responseText;
	
	var strLatestId = transport.responseText.split("|||")[0];
	var strCounter = transport.responseText.split("|||")[1];
			
	$('qForm').reset();
	$('qForm').id.value = "";
	new Ajax.Updater('q_content', 'code/includes/q_list.asp?_r='+Math.random(), { method: 'get', 
		onComplete: function(transport, json){
			new Effect.Highlight('row_' + strLatestId, {startcolor:'#EDF2E6', endcolor:'#FFFFFF'});
		}
	});
	// Set Qx number at top: total Q's + 1.
	$('qCounter').innerHTML = "Question " + strCounter + ".";
}





function moveQuestion(intOne, intTwo){
	new Ajax.Request('code/includes/q_move.asp?_r=' + Math.random(), {method: 'get', parameters: {curp: intOne,newp: intTwo}, evalScripts: true, onComplete: refreshQuestionList});
}







function step_4(){
	new Ajax.Request('code/includes/q_finalise.asp?_r=' + Math.random(), {method: 'get', parameters: $('qForm').serialize(true), evalScripts: true, onComplete: step_4_callback});
}
function step_4_callback(transport){

	response = transport.responseText;
	
	if (response == "ok"){
		window.location.href = "get_started_5.asp";
	}else{
		alert("Please ensure you have added more than one question and less than 25 questions and that your number of questions is a multiple of 5.");
	}
	
}




function loadQuestions(intSet){
	new Ajax.Request('code/includes/survey_list.asp?_r=' + Math.random(), {method: 'get', parameters: {set:intSet}, evalScripts: true, onComplete: loadQuestionsCallback});
}
function loadQuestionsCallback(transport){

	response = transport.responseText;
	$('qlist').innerHTML = response;
	
}





function questionEdit(intID, qNum){
	$('qForm').id.value = intID;
	$('qCounter').innerHTML = "Question " + qNum + ".";
	new Ajax.Request('code/includes/q_info.asp?_r=' + Math.random(), {method: 'get', parameters: {id: intID}, evalScripts: true, onComplete: completeItemLoad});
}

function completeItemLoad(transport){
	response = transport.responseText;
	
	if(response.split("|||")[0] == "YES"){
		$('qForm').tick_ownquestion.checked=true;
		$('qForm').text_q.value=response.split("|||")[2];
		$('ownQ').style.display="block";
	}else{
		$('qForm').tick_ownquestion.checked=false;
		$('qForm').text_q.value="";
	}
	
	for(i=0; i<$('qForm').cat.length; i++){
		if($('qForm').cat[i].value == response.split("|||")[1]){
			$('qForm').cat.selectedIndex = i;
			populateChildrenCus21(1, $('qForm').cat[i].value);
		}
	}
	
	var x = setTimeout("for(i=0; i<$('qForm').question.length; i++){if($('qForm').question[i].value == response.split(\"|||\")[3]){$('qForm').question.selectedIndex = i;}}", 100);
	
}








function questionDelete(intID){

	if(confirm("Are you sure you would like to remove the question from your survey?")){
		new Ajax.Request('code/includes/q_delete.asp?_r=' + Math.random(), {method: 'get', parameters: {id: intID}, evalScripts: true, onComplete: refreshQuestionList});
	}
	
}





function checkQ(){
	if($('tick_ownquestion').checked){
		$("ownQ").style.display = "block";
	}else{
		$("ownQ").style.display = "none";
	}
}



function deleteComment(strID, strTopic){
	if(confirm("Are you sure you want to delete your selected comment?")){
		window.location.href = "code/includes/member_blog_comment_delete.asp?id=" + strID + "&topic=" + strTopic;
	}
}

function alertMediator(strTopic, strPoster){
	if(confirm("Are you sure you want to alert the administrator about this comment?")){
		window.location.href = "code/includes/member_blog_alert.asp?topic=" + strTopic + "&poster=" + strPoster;
	}
}

function deleteActivity(strID){
	if(confirm("Are you sure you want to delete your selected activity?")){
		window.location.href = "code/includes/member_activity_delete.asp?id=" + strID;
	}
}

function deleteFile(strFile){
	if(confirm("Are you sure you want to remove the selected file from your list?")){
		frames['doclist'].location.href = "code/includes/member_doc_delete.asp?file=" + strFile;
	}
}

function tickModule(strID){
	if(confirm("Mark the module as completed?")){
		window.location.href = "code/includes/member_ptc_delete.asp?id=" + strID + "&do=tick";
	}
}

function untickModule(strID){
	if(confirm("Untick the completed module?")){
		window.location.href = "code/includes/member_ptc_delete.asp?id=" + strID + "&do=untick";
	}
}

function checkCommentForm(){		

	var objForm = document.getElementById("commentForm");
	
	if (trim(objForm.comment.value).length < 2){
		alert("Please enter your comment.");
		objForm.comment.value = trim(objForm.comment.value);
		objForm.comment.focus();
		return false;
	}
	
	return true;
}

function checkBlogSubmitForm(){		

	var objForm = document.getElementById("blogSubmitForm");
	
	if (trim(objForm.title.value).length < 2){
		alert("Please enter your title.");
		objForm.title.value = trim(objForm.title.value);
		objForm.title.focus();
		return false;
	}
	
	if (trim(objForm.topic.value).length < 2){
		alert("Please enter the topic text.");
		objForm.topic.value = trim(objForm.topic.value);
		objForm.topic.focus();
		return false;
	}
	
	if (!objForm.frm_agree.checked){
		alert("Please confirm that you have read and agree to the Terms and Conditions.");
		return false;
	}
	
	return true;
}

function checkActivityForm(){		

	var objForm = document.getElementById("activityForm");
	
	if (trim(objForm.frm_company.value).length < 2){
		alert("Please enter the company name.");
		objForm.frm_company.value = trim(objForm.frm_company.value);
		objForm.frm_company.focus();
		return false;
	}
	
	if (trim(objForm.frm_product.value).length < 2){
		alert("Please enter the product name.");
		objForm.frm_product.value = trim(objForm.frm_product.value);
		objForm.frm_product.focus();
		return false;
	}
	
	if (trim(objForm.frm_contact.value).length < 2){
		alert("Please enter the key contact name.");
		objForm.frm_contact.value = trim(objForm.frm_contact.value);
		objForm.frm_contact.focus();
		return false;
	}
	
	
	
	if (trim(objForm.frm_day.value).length != 2 || trim(objForm.frm_day.value) == "dd"){
		alert("Please enter the start date day.");
		objForm.frm_day.value = trim(objForm.frm_day.value);
		objForm.frm_day.focus();
		return false;
	}
	
	if (trim(objForm.frm_month.value).length != 2 || trim(objForm.frm_month.value) == "mm"){
		alert("Please enter the start date month.");
		objForm.frm_month.value = trim(objForm.frm_month.value);
		objForm.frm_month.focus();
		return false;
	}
	
	if (trim(objForm.frm_year.value).length != 4 || trim(objForm.frm_year.value) == "yyyy"){
		alert("Please enter the start date year.");
		objForm.frm_year.value = trim(objForm.frm_year.value);
		objForm.frm_year.focus();
		return false;
	}
	
	
	
	if (trim(objForm.frm_day2.value).length != 2 || trim(objForm.frm_day2.value) == "dd"){
		alert("Please enter the end date day.");
		objForm.frm_day2.value = trim(objForm.frm_day2.value);
		objForm.frm_day2.focus();
		return false;
	}
	
	if (trim(objForm.frm_month2.value).length != 2 || trim(objForm.frm_month2.value) == "mm"){
		alert("Please enter the end date month.");
		objForm.frm_month2.value = trim(objForm.frm_month2.value);
		objForm.frm_month2.focus();
		return false;
	}
	
	if (trim(objForm.frm_year2.value).length != 4 || trim(objForm.frm_year2.value) == "yyyy"){
		alert("Please enter the end date year.");
		objForm.frm_year2.value = trim(objForm.frm_year2.value);
		objForm.frm_year2.focus();
		return false;
	}
	
	
	
	if (trim(objForm.frm_key.value).length < 2){
		alert("Please enter the key contact title.");
		objForm.frm_key.value = trim(objForm.frm_key.value);
		objForm.frm_key.focus();
		return false;
	}
	
	return true;
}

function checkFeedbackForm(){		

	var objForm = document.getElementById("feedbackForm");
	
	if (trim(objForm.frm_title.value).length < 2){
		alert("Please enter your title.");
		objForm.frm_title.value = trim(objForm.frm_title.value);
		objForm.frm_title.focus();
		return false;
	}
	
	if (trim(objForm.frm_name.value).length < 2){
		alert("Please enter your first name.");
		objForm.frm_name.value = trim(objForm.frm_name.value);
		objForm.frm_name.focus();
		return false;
	}
	
	if (trim(objForm.frm_work.value).length < 2){
		alert("Please enter your place of work.");
		objForm.frm_work.value = trim(objForm.frm_work.value);
		objForm.frm_work.focus();
		return false;
	}
	
	if (trim(objForm.frm_surname.value).length < 2){
		alert("Please enter your last name.");
		objForm.frm_surname.value = trim(objForm.frm_surname.value);
		objForm.frm_surname.focus();
		return false;
	}
	
	if (!(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(trim(objForm.frm_email.value)))){
		alert("Please enter a valid email address for yourself.");
		objForm.frm_email.value = trim(objForm.frm_email.value);
		objForm.frm_email.focus();
		return false;
	}
	
	if (trim(objForm.frm_role.value).length < 2){
		alert("Please enter your role.");
		objForm.frm_role.value = trim(objForm.frm_role.value);
		objForm.frm_role.focus();
		return false;
	}

	if (trim(objForm.comments.value).length < 2){
		alert("Please enter your message/comments.");
		objForm.comments.value = trim(objForm.comments.value);
		objForm.comments.focus();
		return false;
	}
	
	return true;
}

function checkForgotForm(){		
	
	var objForm = document.getElementById("forgotForm");
	
	if (trim(objForm.frm_em.value).length < 3){
		alert("Please enter your email address.");
		objForm.frm_em.value = trim(objForm.frm_em.value);
		objForm.frm_em.focus();
		return false;
	}
	
	objForm.fform.disabled = true;
	return true;
}

function checkRegisterForm(){		

	var objForm = document.getElementById("registerForm");
	
	if (trim(objForm.frm_title.value).length < 2){
		alert("Please enter your title.");
		objForm.frm_title.value = trim(objForm.frm_title.value);
		objForm.frm_title.focus();
		return false;
	}
	
	if (trim(objForm.frm_name.value).length < 2){
		alert("Please enter your first name.");
		objForm.frm_name.value = trim(objForm.frm_name.value);
		objForm.frm_name.focus();
		return false;
	}
	
	if (trim(objForm.frm_surname.value).length < 2){
		alert("Please enter your last name.");
		objForm.frm_surname.value = trim(objForm.frm_surname.value);
		objForm.frm_surname.focus();
		return false;
	}
	
	if (trim(objForm.frm_role.value).length < 2){
		alert("Please enter your role.");
		objForm.frm_role.value = trim(objForm.frm_role.value);
		objForm.frm_role.focus();
		return false;
	}
	
	if (trim(objForm.frm_specialty.value).length < 2){
		alert("Please enter your speciality.");
		objForm.frm_specialty.value = trim(objForm.frm_specialty.value);
		objForm.frm_specialty.focus();
		return false;
	}
	
	if (!(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(trim(objForm.frm_email.value)))){
		alert("Please enter a valid email address for yourself.");
		objForm.frm_email.value = trim(objForm.frm_email.value);
		objForm.frm_email.focus();
		return false;
	}
	
	if (trim(objForm.frm_user.value).length < 2){
		alert("Please enter a desired username.");
		objForm.frm_user.value = trim(objForm.frm_user.value);
		objForm.frm_user.focus();
		return false;
	}
	
	if (trim(objForm.frm_pass.value).length < 2){
		alert("Please enter a password.");
		objForm.frm_pass.value = trim(objForm.frm_pass.value);
		objForm.frm_pass.focus();
		return false;
	}
	
	if (trim(objForm.frm_confirm.value).length < 2){
		alert("Please confirm your password password.");
		objForm.frm_confirm.value = trim(objForm.frm_confirm.value);
		objForm.frm_confirm.focus();
		return false;
	}
	
	if (trim(objForm.frm_confirm.value) != trim(objForm.frm_pass.value)){
		alert("Please ensure your password match.");
		objForm.frm_confirm.focus();
		return false;
	}
	
	if (!objForm.frm_agree.checked){
		alert("Please confirm that you have read and agree to the Terms and Conditions.");
		return false;
	}
	
	return true;
}



















function deleteItem(strID, strType){
	if(confirm("Are you sure you want to delete the selected " + strType + "?")){
		window.location.href = "code/includes/member_saved_delete.asp?id=" + strID;
	}
}

function checkLen(Target, intLen, strChars){

	StrLen = Target.value.length;
	if (StrLen > intLen){
		Target.value = Target.value.substring(0, intLen);
		charsLeft = 0;
	}
	else{
		charsLeft = intLen - StrLen;
	}
	document.getElementById(strChars).innerHTML = charsLeft;
	
}

function processNode(intNode){if(document.getElementById('q' + intNode).style.display=='none'){document.getElementById('q' + intNode).style.display='block';}else{document.getElementById('q' + intNode).style.display='none';}}

function showHide(strObject){
	if(document.getElementById(strObject).style.display == 'none'){
		document.getElementById(strObject).style.display = 'block';
	}else{
		document.getElementById(strObject).style.display = 'none';
	}
}

function showHidePoster(strObject){
	if(strObject == "poster_1"){
		if(document.getElementById("poster_1").style.display == 'none'){
			document.getElementById("poster_1").style.display = 'block';
			document.getElementById("poster_2").style.display = 'none';
		}else{
			document.getElementById("poster_1").style.display = 'none';
		}
	}else{
		if(document.getElementById("poster_2").style.display == 'none'){
			document.getElementById("poster_2").style.display = 'block';
			document.getElementById("poster_1").style.display = 'none';
		}else{
			document.getElementById("poster_2").style.display = 'none';
		}
	}
	
	
}

function LoadGallery(pictureName,imageFile){
	if (document.all){
		document.getElementById(pictureName).style.filter="blendTrans(duration=1)";
		document.getElementById(pictureName).filters.blendTrans.Apply();
	}
	document.getElementById(pictureName).src = imageFile;
	document.getElementById('PhotoGalleryLink').href = imageFile.replace("medium", "large");
	if (document.all){
		document.getElementById(pictureName).filters.blendTrans.Play();
	}
}

function popupWindow(strURL){		
	window.open(strURL);
}

function copyText(strText)
{
document.getElementById('holdtext').innerText = strText;
Copied = holdtext.createTextRange();
Copied.execCommand("Copy");
}

function checkAllBoxes(f, strElementName){
	var isChecked = true;
	if(!f.elements[strElementName].length){
		f.elements[strElementName].checked = false;
	}else{
		for(var counter=0; counter < f.elements[strElementName].length; counter++){
		f.elements[strElementName][counter].checked = false;
	}
	}
}

function checkLoginForm(){		
	
	var objForm = document.getElementById("frm_login");
	
	if (trim(objForm.username.value).length < 2){
		alert("Please enter your username.");
		objForm.username.value = trim(objForm.username.value);
		objForm.username.focus();
		return false;
	}
	
	if (trim(objForm.password.value).length < 2){
		alert("Please enter your password.");
		objForm.password.value = trim(objForm.password.value);
		objForm.password.focus();
		return false;
	}
	
	return true;
}

function checkSearchForm(){		
	
	var objForm = document.getElementById("searchForm");
	
	if (trim(objForm.keywords.value).length < 3){
		alert("Please enter your keyword(s).");
		objForm.keywords.value = trim(objForm.keywords.value);
		objForm.keywords.focus();
		return false;
	}
	
	return true;
}

function checkNewsroomSearchForm(){		
	
	var objForm = document.getElementById("srch_frm2");
	
	if (trim(objForm.keywords.value).length < 3){
		alert("Please enter your keyword(s).");
		objForm.keywords.value = trim(objForm.keywords.value);
		objForm.keywords.focus();
		return false;
	}
	
	return true;
}

function checkSubscribeForm(){		
	
	var objForm = document.getElementById("subscribeForm");
	
	if (!(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(trim(objForm.frm_email.value)))){
		alert("Please enter a valid email address.\n");
		objForm.frm_email.value = trim(objForm.frm_email.value);
		objForm.frm_email.focus();
		return false;
	}

	//objForm.addbut.value = "Please wait...";
	objForm.addbut.disabled = true;
	
	return true;
}




function checkMemberForm(){		
	
	var objForm = document.getElementById("memberForm");
	
	if (trim(objForm.frn1.value).length < 2){
		alert("Please enter your first name.");
		objForm.frn1.value = trim(objForm.frn1.value);
		objForm.frn1.focus();
		return false;
	}
	
	if (trim(objForm.srn2.value).length < 2){
		alert("Please enter your last name.");
		objForm.srn2.value = trim(objForm.srn2.value);
		objForm.srn2.focus();
		return false;
	}
	
	if (trim(objForm.cll3.value).length != 10){
		alert("Please enter your mobile number.");
		objForm.cll3.value = trim(objForm.cll3.value);
		objForm.cll3.focus();
		return false;
	}
	
	return true;
}

function deleteProduct(strID){
	if(confirm("Are you sure you would like to DELETE this product?")){
		window.location.href = "code/includes/members_products_delete.asp?id=" + strID;
	}
}

function checkEventForm(){		
	
	var objForm = document.getElementById("eventForm");
	
	if (trim(objForm.evetntitle.value).length < 2){
		alert("Please enter the event title.");
		objForm.evetntitle.value = trim(objForm.evetntitle.value);
		objForm.evetntitle.focus();
		return false;
	}
	
	if (trim(objForm.datefrom.value).length < 2){
		alert("Please enter the FROM date.");
		objForm.datefrom.value = trim(objForm.datefrom.value);
		objForm.datefrom.focus();
		return false;
	}
	
	if (trim(objForm.venue.value).length < 2){
		alert("Please enter the venue.");
		objForm.venue.value = trim(objForm.venue.value);
		objForm.venue.focus();
		return false;
	}
	
	if (trim(objForm.location.value).length < 2){
		alert("Please enter the location/city/town.");
		objForm.location.value = trim(objForm.location.value);
		objForm.location.focus();
		return false;
	}
	
	if (trim(objForm.contact.value).length < 2){
		alert("Please enter the name of the contact person.");
		objForm.contact.value = trim(objForm.contact.value);
		objForm.contact.focus();
		return false;
	}
	
	if (!(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(trim(objForm.ema123.value)))){
		alert("Please enter a valid email address for yourself.");
		objForm.ema123.value = trim(objForm.ema123.value);
		objForm.ema123.focus();
		return false;
	}
	
	if (trim(objForm.desc11.value).length < 2){
		alert("Please enter the event description.");
		objForm.desc11.value = trim(objForm.desc11.value);
		objForm.desc11.focus();
		return false;
	}
	
	return true;
}

function checkProductForm(){		
	
	var objForm = document.getElementById("productForm");
	
	if (trim(objForm.name.value).length < 2){
		alert("Please enter your product name.");
		objForm.name.value = trim(objForm.name.value);
		objForm.name.focus();
		return false;
	}
	
	if (objForm.location.selectedIndex == 0){
		alert("Please select the location.");
		objForm.location.focus();
		return false;
	}
	
	if (objForm.min.selectedIndex == 0){
		alert("Please select your minimum rates.");
		objForm.min.focus();
		return false;
	}
	
	
	
	if (trim(objForm.physical.value).length < 2){
		alert("Please enter your physical address.");
		objForm.physical.value = trim(objForm.physical.value);
		objForm.physical.focus();
		return false;
	}
	
	if (trim(objForm.postal.value).length < 2){
		alert("Please enter your postal address.");
		objForm.postal.value = trim(objForm.postal.value);
		objForm.postal.focus();
		return false;
	}
	
	if (trim(objForm.brief.value).length < 2){
		alert("Please enter a brief.");
		objForm.brief.value = trim(objForm.brief.value);
		objForm.brief.focus();
		return false;
	}
	
	if (trim(objForm.description.value).length < 2){
		alert("Please enter a description.");
		objForm.description.value = trim(objForm.description.value);
		objForm.description.focus();
		return false;
	}
	
	return true;
}