function validcon(contact){
			if(contact.OrganizationName.value == "" ){
				alert("please enter your organization name")
				contact.OrganizationName.focus()
				return false
			}
                        
			
			else if (contact.OrganizationType.value == "" ){
				alert("please enter your organization type")
				contact.OrganizationType.focus()
				return false
			}
			else if (contact.OfficeAddress.value == "" ){
				alert("please enter the address of your organization")
				contact.OfficeAddress.focus()
				return false
			}
			else if (contact.City.value == "" ){
				alert("please enter the city your organization is located")
				contact.City.focus()
				return false
			}
			else if (contact.ContactName.value == "" ){
				alert("please enter the name of contact person in your organization")
				contact.ContactName.focus()
				return false
			}
			else if (contact.ContactMail.value == "" ){
				alert("please enter the email address of the contact person")
				contact.ContactMail.focus()
				return false
			}
                        else if (contact.ConfirmMail.value != contact.ContactMail.value ){
				alert("email do not match")
				contact.ContactMail.focus()
				return false
			}
			else if (contact.gmp_username.value == "" ){
				alert("please enter your desired username")
				contact.gmp_username.focus()
				return false
			}

			else if (contact.gmp_password.value == "" ){
				alert("please enter your desired password")
				contact.gmp_password.focus()
				return false
			}
			else if (contact.gmp_password.value != contact.confirm_gmp_password.value ){
				alert("Passwords did not match")
				contact.confirm_gmp_password.focus()
				return false
			}
                       
			
			
			
			return true
		}



function validAdvert(contact){
			if(contact.org_name.value == "" ){
				alert("please enter your organization name")
				contact.org_name.focus()
				return false
			}
                        
			
			else if (contact.physical_addr.value == "" ){
				alert("please enter your office physical address")
				contact.physical_addr.focus()
				return false
			}
			else if (contact.org_state.value == "" ){
				alert("please enter the state where your office is location")
				contact.org_state.focus()
				return false
			}
			else if (contact.org_email.value == "" ){
				alert("please enter your organization details")
				contact.org_email.focus()
				return false
			}
			else if (contact.org_phone.value == "" ){
				alert("please enter organization contact phone number")
				contact.org_phone.focus()
				return false
			}
			else if (contact.adv_type.value == "" ){
				alert("please enter your desired advert type")
				contact.adv_type.focus()
				return false
			}
                       
			else if (contact.adv_details.value == "" ){
				alert("please give full details of intended advert")
				contact.adv_details.focus()
				return false
			}

			else if (contact.gmp_password.value == "" ){
				alert("please enter your desired password")
				contact.gmp_password.focus()
				return false
			}
			else if (contact.gmp_password.value != contact.confirm_gmp_password.value ){
				alert("Passwords did not match")
				contact.confirm_gmp_password.focus()
				return false
			}
                       
			
			
			
			return true
		}


function validPostNews(contact){
			if(contact.News_Category.value == "" ){
				alert("Please select news category")
				contact.News_Category.focus()
				return false
			}
                   
			else if (contact.news_title.value == "" ){
				alert("please enter news title")
				contact.news_title.focus()
				return false
		} 
                else if (contact.paragraph1.value == "" ){
				alert("Paragraph1 cannot be empty!")
				contact.paragraph1.focus()
				return false
		}
                       
			
			
			
			return true
		}

function validPostMsg(contact){
			if(contact.msg_name.value == "" ){
				alert("please enter your full name")
				contact.msg_name.focus()
				return false
			}
                        
			
			else if (contact.msg_email.value == "" ){
				alert("please enter your email adddress")
				contact.msg_email.focus()
				return false
		}
                       	else if (contact.msg_phone.value == "" ){
				alert("please enter your phone number")
				contact.msg_phone.focus()
				return false
		}
                      	else if (contact.msg_subject.value == "" ){
				alert("please enter the subject")
				contact.msg_subject.focus()
				return false
		}
                      	else if (contact.msg_msg.value == "" ){
				alert("please enter your message")
				contact.msg_msg.focus()
				return false
		}
                      
			
			
			
			return true
		}

function validSchedule(contact){
			if(contact.programme.value == "" ){
				alert("please enter a programmes")
				contact.programme.focus()
				return false
			}
                        
			
			else if (contact.presenter.value == "" ){
				alert("please enter presenter's name")
				contact.presenter.focus()
				return false
		}
                       	else if (contact.synopsis.value == "" ){
				alert("please programme synopsis")
				contact.synopsis.focus()
				return false
		}
                      	else if (contact.prog_day.value == "" ){
				alert("please select programme day")
				contact.prog_day.focus()
				return false
	}
                      	else if (contact.url_name.value == "" ){
				alert("please enter name of website")
				contact.url_name.focus()
				return false
	}
                      	else if (contact.url_address.value == "" ){
				alert("please enter URL address")
				contact.url_address.focus()
				return false
		}
                      	else if (contact.msg_msg.value == "" ){
				alert("please enter your message")
				contact.msg_msg.focus()
				return false
		}
                      
			
			 	else if (contact.media_title.value == "" ){
				alert("please media file title")
				contact.media_title.focus()
				return false
		}
                      	else if (contact.media_desc.value == "" ){
				alert("please enter decription of file content")
				contact.media_desc.focus()
				return false
		}
                      
		
			
			return true
		}

function validTell_A_Friend(contact){
			if(contact.f_email.value == "" ){
				alert("please enter your friend's email")
				contact.f_email.focus()
				return false
			}
			
			return true
		}

function validLogin(contact){
			if(contact.username.value == "" ){
				alert("please insert your username")
				contact.username.focus()
				return false
			}
                        
			
			else if (contact.password.value == "" ){
				alert("please enter your pasword")
				contact.password.focus()
				return false
			}
			else if (contact.status.value == "" ){
				alert("please select publisher or contractor")
				contact.status.focus()
				return false
			}
			
                      						
			
			return true
		}



function validAlert(contact){
			if(contact.ContactMail.value == "" ){
				alert("please insert your email address")
				contact.ContactMail.focus()
				return false
			}
                        
			
			else if (contact.ConfirmMail.value == "" ){
				alert("Confirm your email address")
				contact.ConfirmMail.focus()
				return false
			}
                        else if (contact.ConfirmMail.value != contact.ContactMail.value ){
				alert("emails did not match")
				contact.ContactMail.focus()
				return false
			}
			
                      						
			
			return true
		}
		

function validSearch(contact){
			if(contact.min_value.value == "" ){
				alert("please insert Minimum Fee")
				contact.min_value.focus()
				return false
			}
                   
			else if (contact.max_value.value == "" ){
				alert("please enter Maximum Fee")
				contact.max_value.focus()
				return false
			}
			else if (contact.status.value == "" ){
				alert("please select Tender / RFP")
				contact.status.focus()
				return false
			}
			
                      						
			
			return true
		}
		

function validUpload(contact){
			if(contact.myfile.value == "" ){
				alert("please insert a file to upload")
				contact.myfile.focus()
				return false
			}
                        
			
			else if (contact.password.value == "" ){
				alert("please enter your pasword")
				contact.password.focus()
				return false
			}
			else if (contact.status.value == "" ){
				alert("please select publisher or contractor")
				contact.status.focus()
				return false
			}
			
                      						
			
			return true
		}


function validcontractor(contact){
			if(contact.RegisteredName.value == "" ){
				alert("please enter your registered business name")
				contact.RegisteredName.focus()
				return false
			}
		
			else if (contact.TradingName.value == "" ){
				alert("please enter your trading name")
				contact.TradingName.focus()
				return false
			}
                       
			else if (contact.OfficeAddress.value == "" ){
				alert("please enter office address")
				contact.OfficeAddress.focus()
				return false
			}
			else if (contact.PostalAddress.value == "" ){
				alert("please enter your postal address")
				contact.PostalAddress.focus()
				return false
			}
			else if (contact.OfficeMail.value == "" ){
				alert("please enter business email address")
				contact.OfficeMail.focus()
				return false
			}
			else if (contact.Directors.value == "" ){
				alert("please enter your company directors")
				contact.Directors.focus()
				return false
			}
			else if (contact.RegNo.value == "" ){
				alert("please enter your business registration number")
				contact.RegNo.focus()
				return false
			}
			else if (contact.ContactName.value == "" ){
				alert("please enter the name of your contact person")
				contact.ContactName.focus()
				return false
			}
			else if (contact.ContactMail.value == "" ){
				alert("please enter the email address of your contact person")
				contact.ContactMail.focus()
				return false
			}
			else if (contact.ContactMobile.value == "" ){
				alert("please enter the mobile phone of the contact person")
				contact.ContactMobile.focus()
				return false
			}
			
			else if (contact.OfficeMail.value != contact.ConfirmOfficeMail.value ){
				alert("office email did not match")
				contact.OfficeMail.focus()
				return false
			}
			else if (contact.ContactMail.value != contact.ConfirmContactMail.value ){
				alert("contact mail did not match")
				contact.ContactMail.focus()
				return false
			}
			
			else if (contact.con_username.value == "" ){
				alert("please enter your desired username")
				contact.con_username.focus()
				return false
			}

			else if (contact.con_password.value == "" ){
				alert("please enter your desired password")
				contact.con_password.focus()
				return false
			}
			else if (contact.con_password.value != contact.confirm_con_password.value ){
				alert("Passwords did not match")
				contact.confirm_con_password.focus()
				return false
			}
			else if (!(contact.Agree.checked )){
				alert("you must agree to the terms before proceeding")
				contact.Agree.focus()
				return false
			}
	
				return true
		}
		

function validConUpdate(contact){
			if(contact.RegisteredName.value == "" ){
				alert("please enter your registered business name")
				contact.RegisteredName.focus()
				return false
			}
		
			else if (contact.TradingName.value == "" ){
				alert("please enter your trading name")
				contact.TradingName.focus()
				return false
			}
                       
			else if (contact.OfficeAddress.value == "" ){
				alert("please enter office address")
				contact.OfficeAddress.focus()
				return false
			}
			else if (contact.PostalAddress.value == "" ){
				alert("please enter your postal address")
				contact.PostalAddress.focus()
				return false
			}
			else if (contact.OfficeMail.value == "" ){
				alert("please enter business email address")
				contact.OfficeMail.focus()
				return false
			}
			else if (contact.Directors.value == "" ){
				alert("please enter your company directors")
				contact.Directors.focus()
				return false
			}
			else if (contact.RegNo.value == "" ){
				alert("please enter your business registration number")
				contact.RegNo.focus()
				return false
			}
			else if (contact.ContactName.value == "" ){
				alert("please enter the name of your contact person")
				contact.ContactName.focus()
				return false
			}
			else if (contact.ContactMail.value == "" ){
				alert("please enter the email address of your contact person")
				contact.ContactMail.focus()
				return false
			}
			else if (contact.ContactMobile.value == "" ){
				alert("please enter the mobile phone of the contact person")
				contact.ContactMobile.focus()
				return false
			}
		
			
			else if (contact.con_username.value == "" ){
				alert("please enter your desired username")
				contact.con_username.focus()
				return false
			}

			else if (!(contact.Agree.checked )){
				alert("you must agree to the terms before proceeding")
				contact.Agree.focus()
				return false
			}
	
				return true
		}
function opendate(x){
	birthdate = window.open(x, "bookwin", "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizeable=yes,width=240,height=220");
	birthdate.focus();
	}
	
function NewMonthFirstAnnounce(x, y, z, par, display, hidden){
	newpage = x.options[x.selectedIndex].value
	if(newpage != ""){		
		window.location = "firstannounce.php?UseMonth=" + newpage + "&UseDay=" + y + "&UseYear=" + z + "&UsePar=" + par;
	}
	}
	
function NewYearFirstAnnounce(x, y, z, par, display, hidden){
	newpage = z.options[z.selectedIndex].value
	if(newpage != ""){		
		window.location = "firstannounce.php?UseMonth=" + x + "&UseDay=" + y + "&UseYear=" + newpage + "&UsePar=" + par;
	}
	}
	
function closesFirstAnnounce(y, m, d, display, hidden){
	opener.document.form1.FirstAnnounced.value = y + "-" + m + "-" + d;
	opener.document.form1.DisplayFirstAnnounced.value = y + "-" + m + "-" + d;
	self.close();
	}
	
function NewMonthFirstOnCorenet(x, y, z, par, display, hidden){
	newpage = x.options[x.selectedIndex].value
	if(newpage != ""){		
		window.location = "gmpcorenetpubdate.php?UseMonth=" + newpage + "&UseDay=" + y + "&UseYear=" + z + "&UsePar=" + par;
	}
	}
	
function NewYearFirstOnCorenet(x, y, z, par, display, hidden){
	newpage = z.options[z.selectedIndex].value
	if(newpage != ""){		
		window.location = "gmpcorenetpubdate.php?UseMonth=" + x + "&UseDay=" + y + "&UseYear=" + newpage + "&UsePar=" + par;
	}
	}
	
function closesFirstOnCorenet(y, m, d, display, hidden){
	opener.document.form1.PublicationDateOnCorenet.value = y + "-" + m + "-" + d;
	opener.document.form1.DisplayPublicationDateOnCorenet.value = y + "-" + m + "-" + d;
	self.close();
	}
	
function NewMonthLastCollection(x, y, z, par, display, hidden){
	newpage = x.options[x.selectedIndex].value
	if(newpage != ""){		
		window.location = "lastcollection.php?UseMonth=" + newpage + "&UseDay=" + y + "&UseYear=" + z + "&UsePar=" + par;
	}
	}
	
function NewYearLastCollection(x, y, z, par, display, hidden){
	newpage = z.options[z.selectedIndex].value
	if(newpage != ""){		
		window.location = "lastcollection.php?UseMonth=" + x + "&UseDay=" + y + "&UseYear=" + newpage + "&UsePar=" + par;
	}
	}
	
function closesLastCollection(y, m, d, display, hidden){
	opener.document.form1.LastDateOfDocumentCollection.value = y + "-" + m + "-" + d;
	opener.document.form1.DisplayLastDateOfDocumentCollection.value = y + "-" + m + "-" + d;
	self.close();
	}
	
	
function NewMonthLastSubmission(x, y, z, par, display, hidden){
	newpage = x.options[x.selectedIndex].value
	if(newpage != ""){		
		window.location = "lastsubmission.php?UseMonth=" + newpage + "&UseDay=" + y + "&UseYear=" + z + "&UsePar=" + par;
	}
	}
	
function NewYearLastSubmission(x, y, z, par, display, hidden){
	newpage = z.options[z.selectedIndex].value
	if(newpage != ""){		
		window.location = "lastsubmission.php?UseMonth=" + x + "&UseDay=" + y + "&UseYear=" + newpage + "&UsePar=" + par;
	}
	}
	
function closesLastSubmission(y, m, d, display, hidden){
	opener.document.form1.LastDateForSubmission.value = y + "-" + m + "-" + d;
	opener.document.form1.DisplayLastDateForSubmission.value = y + "-" + m + "-" + d;
	self.close();
	}
	
function NewMonthOpeningDate(x, y, z, par, display, hidden){
	newpage = x.options[x.selectedIndex].value
	if(newpage != ""){		
		window.location = "openingdate.php?UseMonth=" + newpage + "&UseDay=" + y + "&UseYear=" + z + "&UsePar=" + par;
	}
	}
	
function NewYearOpeningDate(x, y, z, par, display, hidden){
	newpage = z.options[z.selectedIndex].value
	if(newpage != ""){		
		window.location = "openingdate.php?UseMonth=" + x + "&UseDay=" + y + "&UseYear=" + newpage + "&UsePar=" + par;
	}
	}
	
function closesOpeningDate(y, m, d, display, hidden){
	opener.document.form1.OpeningDate.value = y + "-" + m + "-" + d;
	opener.document.form1.DisplayOpeningDate.value = y + "-" + m + "-" + d;
	self.close();
	}
	
function validtender(contact){
			if(contact.Title.value == "" ){
				alert("please enter the tender title")
				contact.Title.focus()
				return false
			}
			
			else if (contact.ReferenceNo.value == "" ){
				alert("please enter the reference no.")
				contact.ReferenceNo.focus()
				return false
			}
                        else if (contact.ProductCategory.value == "" ){
				alert("please select product classification.")
				contact.ProductCategory.focus()
				return false
			}
                        else if (contact.SubCategory.value == "" ){
				alert("please select product category.")
				contact.SubCategory.focus()
				return false
			}
			else if (contact.LastDateForSubmission.value == "" ){
				alert("please select last date for submission")
				return false
			}
			else if (contact.OpeningDate.value == "" ){
				alert("please select opening date")
				return false
			}
					
			return true
		}
		
		
function showToolTip(e,text){ 
      document.all.ToolTip.innerHTML="<table><tr><td class=ToolTipTD>"+text+"</td></tr></table>"; 
      ToolTip.style.pixelLeft=(e.x+15+document.body.scrollLeft); 
      ToolTip.style.pixelTop=(e.y+document.body.scrollTop); 
      ToolTip.style.visibility="visible"; 
} 
function hideToolTip(){ 
      ToolTip.style.visibility="hidden"; 
}

