	function check_fullname(obj)
	{
		current_fullname = obj.charAt(0) + "_fullname";
		Fullname = document.getElementById(current_fullname);

		if(Fullname.value == "")
		{
			//Fullname.style.color='red';
			return false;
		}
		else
		{
			//Fullname.style.color='#330099';
			return true;
		}
	}

	function check_fullemail(obj)
	{
		current_fullemail = obj.charAt(0) + "_fullemail";
		Fullemail = document.getElementById(current_fullemail);

		if(Fullemail.value == "")
		{
			//Fullname.style.color='red';
			return false;
		}
		else
		{
			//Fullname.style.color='#330099';
			return true;
		}
	}
	
	function check_fullproject(obj)
	{
		current_fullproject = obj.charAt(0) + "_fullproject";
		Fullproject = document.getElementById(current_fullproject);

		if(Fullproject.value == "")
		{
			//Fullname.style.color='red';
			return false;
		}
		else
		{
			//Fullname.style.color='#330099';
			return true;
		}
	}
	
	function check_fullmessage(obj)
	{
		current_fullmessage = obj.charAt(0) + "_fullmessage";
		Fullmessage = document.getElementById(current_fullmessage);

		if(Fullmessage.value == "")
		{
			//Fullname.style.color='red';
			return false;
		}
		else
		{
			//Fullname.style.color='#330099';
			return true;
		}
	}
	
	function check_billing_shipping(formobj,address)
	{
		current_fullname = address + '_fullname';
		current_fullemail = address + '_fullemail';
		current_fullproject = address + '_fullproject';
		current_fullmessage = address + '_fullmessage';

		//--Fullname-------------------------------------
		if(!check_fullname(current_fullname))
		{
			alert("You did not enter a name!");
			document.getElementById(current_fullname).focus();
			return false;
		}
		if(!check_fullemail(current_fullemail))
		{
			alert("Email is not empty!");
			document.getElementById(current_fullemail).focus();
			return false;
		}
		if(!check_fullproject(current_fullproject))
		{
			alert("You did not enter a Project!");
			document.getElementById(current_fullproject).focus();
			return false;
		}
		if(!check_fullmessage(current_fullmessage))
		{
			alert("Message is not empty!");
			document.getElementById(current_fullmessage).focus();
			return false;
		}
		

		return true;
	}
	
	var va = new Array();
	function getElementsByClassName(className, tag, elm){
		var testClass = new RegExp("(^|\\s)" + className + "(\\s|$)");
		var tag = tag || "*";
		var elm = elm || document;
		var elements = (tag == "*" && elm.all)? elm.all : elm.getElementsByTagName(tag);
		var returnElements = [];
		var current;
		var length = elements.length;
		for(var i=0; i<length; i++){
			current = elements[i];
			if(testClass.test(current.className)){
				returnElements.push(current);
			}
		}
		
		return returnElements;
	}
	
	function showMe (it, box) {
		  var vis = (box.checked) ? "block" : "none";
		  document.getElementById(it).style.display = vis;	  
		  check_submit(formobj)
	}
	
	function check_submit(formobj)
	{
		var check_bill = true;
		var check_ship = true;
		
		
		if (check_bill == true)
		{
			//Billing
			current_dist = 'b_dist';
			current_state = 'b_state';
			check_ship = check_billing_shipping(formobj,'b');
		}
		else
			return false;
		if (check_ship == false)
		{
			return false;
		}
		else
		{
			//Shipping
			current_dist = 's_dist';
			current_state = 's_state';
			//check package
			var list = getElementsByClassName('package_psd');
			var check = 0;		
			for (var i = 0;i<list.length;i++) {
			     if (list[i].checked) {
			        va[check] = list[i];
			        check +=  parseInt(list[i].value);
			     }
			}
			
			var list_psd = getElementsByClassName('check_psd');
			var check_psd = 0;
			for (var i = 0;i<list_psd.length;i++) {
			     if (list_psd[i].checked) {
			        va[check_psd] = list_psd[i];
			        check_psd +=  parseInt(list_psd[i].value);
			     }
			}
			
			if(document.getElementById('check_show_day').checked==true){
				if(!check_psd){
					alert('You dont choose package!')
					return false;
				}
			}else{
			
				if(!check){
					alert('You dont choose package!')
					return false;
				}
			}
			//end
			if(document.getElementById('check_file').value =="0"){
				alert('You need upload file!')
				return false;
			}
			
			return true;
		}
		
	}
//]]>