var helpinfo=[];
helpinfo['apreshelp']='<p>You can create a resume on-line using our resume template.  Once created, you can tick this checkbox to automatically include access to your Jobs4Careers resume so that the job lister can view your resume on-line.</p>'+
	'<p>To find out more about our resume system, please create a Jobs4Careers account, log in and go to the "My Account" link at the top of this page.</p>'+
	'<p>If you would like to speak with someone, please call us on (03) 9853 7452.</p>';
	
/* Job Help */
helpinfo['job:reference']='<p>The job reference number is a reference that is unique to you regarding the job advertisement.  It'+
	' is a good way of determining which advertisement applicants are referring to when enquiring about a job.</p>'+
	'<p>A reference number is required in a Jobs4Careers advertisement.</p>';
helpinfo['job:profession']='<p>The profession is used to determine the areas to display the job.  You need to select one of the '+
	'options available from the drop-down list.  This will determine the classification for your job.</p>';
helpinfo['job:jobtype']='<p>The job type relates to the type of position that advertisement is within.  It serves as a secondary '+
	'level of classification for a job listing after the profession.</p>';
helpinfo['job:jobtitle']='<p>The job title is the most important aspect of the job listing.  It is the most prominent aspect of '+
	'the job listing, and is often used as the primary match for job searches.</p>'+
	'<p>As a guide, ensure your job title clearly labels the job in a concise and to-the-point manner.  This will ensure the job '+
	'is accurately perceived by viewers - hence ensuring a greater level of eligible applicants.</p>';
helpinfo['job:abstract']='<p>An abstract represents the brief summary of the job listing.  This is the quick summary of the '+
	'requirements of the position that will appear in job search results.</p>'+
	'<p>As a guide, ensure that the abstract is concise to allow users to easily identify what the job is and what the opportunities '+
	'are.  The job description (next entry) can provide more in-depth information.</p>';
helpinfo['job:description']='<p>The job description provides the body of the job advertisement.  The majority of the information '+
	'about the listing is kept in this section of the advertisement.</p>'+
	'<p>A job description should include information about responsibilities and requirements of the position as well as listing what '+
	'you are looking for in an employee.  In essence, the job description is the framing of the opportunity.</p>';
helpinfo['job:special']='<p>The special requirements entry allows you to identify anything that is necessary to work in the position '+
	'advertised.  This may include necessary qualifications, certificates or courses as well as information about relevant work Visas.</p>';
helpinfo['job:salary']='<p>It is often a good idea to provide a salary range with the job.  This is because by identifying a likely salary '+
	'range, you are attracting job seekers that are looking for a similar level of compensation for their services.  Jobs4Careers provides '+
	'a range of salaries from which to choose from using the drop-down select box.</p>';
helpinfo['job:worktype']='<p>Work Type defines the level of commitment required for the job - ie Full-Time, Part-Time or Casual.</p>';
helpinfo['job:appnclose']='<p>Specify a date at which you will no longer be accepting applications.</p>'+
	'<p>To enter a date, simply click on the calendar item and select a date from the calendar.</p>';
helpinfo['job:adexpires']='<p>While advertisements on Jobs4Careers are not given a system expiry, we provide you with the chance'+
	'to specify if you would like the job to disappear from our listings at any point.</p>'+
	'<p>To enter a date, simply click on the calendar item and select a date from the calendar.</p>';
helpinfo['job:number']='<p>What is the street number of the job\'s location?</p><p>The address of the placement forms a crucial part of our '+
	'job mapping service.  This allows job seekers to find jobs that are available in geographic proximity to a chosen address.</p>'
helpinfo['job:street']='<p>The name of the street where the job is located.</p><p>The address of the placement forms a crucial part of our '+
	'job mapping service.  This allows job seekers to find jobs that are available in geographic proximity to a chosen address.</p>'
helpinfo['job:streettype']='<p>The type of street the job is located on - ie St, Rd, Cres, Avenue, etc.</p><p>The address of the placement forms a crucial part of our '+
	'job mapping service.  This allows job seekers to find jobs that are available in geographic proximity to a chosen address.</p>'
helpinfo['job:suburb']='<p>What is the suburb in which the job is located?</p><p>The address of the placement forms a crucial part of our '+
	'job mapping service.  This allows job seekers to find jobs that are available in geographic proximity to a chosen address.</p>'
helpinfo['job:state']='<p>What is the state in which the job is located?</p><p>The address of the placement forms a crucial part of our '+
	'job mapping service.  This allows job seekers to find jobs that are available in geographic proximity to a chosen address.</p>'
helpinfo['job:postcode']='<p>What is the postcode in which the job is located?</p><p>The address of the placement forms a crucial part of our '+
	'job mapping service.  This allows job seekers to find jobs that are available in geographic proximity to a chosen address.</p>'
helpinfo['job:country']='<p>What is the country in which the job is located?</p><p>The address of the placement forms a crucial part of our '+
	'job mapping service.  This allows job seekers to find jobs that are available in geographic proximity to a chosen address.</p>'

/* Practice Help */
helpinfo['practice:ref']='<p>Reference is to be used as your own reference for this practice.  It provides a simple way for both you '+
	'and practice seekers to identify a specific advertisement.  When choosing a reference, choose one that can assist you in easy identification '+
	'of a practice in the case where you may receive phone enquiries.</p>';
helpinfo['practice:title']='<p>The title for a business for sale will be used as the title throughout the website.  Make sure that '+
	'it is an accurate summary of the business opportunity as this will attract the most suitable buyers/interested parties.</p>';
helpinfo['practice:professionID']='<p>This classification identifies which profession the business relates to.  Practice4Sale ensures '+
	'that businesses are marketed to the correct users; ensuring a more valuable service to both the listing party and the browsing party.</p>';
helpinfo['practice:salesTypeID']='<p>The Sale Type refers to the manner in which the business is to be sold.  At Practice4Sale we allow '+
	'for practices for sale to be listed under a number of different sale types to aid users when they are searching for practices for sale.</p>';
helpinfo['practice:state']='<p>The state in which the business/practice is listed for sale.</p>';
helpinfo['practice:regionID']='<p>While we do not require specifics regarding the location of the business, we ask that you provide a region '+
	'to assist in understanding the general location of the business opportunity for potential buyers.</p>';
helpinfo['practice:price']='<p>The price the business is for sale for, (in numbers only).</p>';
helpinfo['practice:contactname']='<p>This will be the name to whom browsers will forward their enquiries.  It can be the same name as your '+
	'account or it can be an alternative contact person.</p>';
helpinfo['practice:contactphone']='<p>The phone number to which enquiries for the practice should be directed to.</p>';
helpinfo['practice:contactemail']='<p>The email address that enquiries from the website should be sent to.</p>';

function showPos(newField){
	curX=0;
	curY=0;
	var theElement=document.getElementById(newField);
	while(theElement!=null){
		curX+=theElement.offsetLeft;
		curY+=theElement.offsetTop;
		theElement=theElement.offsetParent;
	}
	curY+=18;
	
	return new Array(curX,curY);
}

var help={
	helpdiv:'',
	helpdivbg:'',
	helpdivfix:'',
	showing:false,
	
	hide:function(){
		if(document.getElementById('mainpage')){
			document.getElementById('mainpage').removeChild(helpdiv);
			document.getElementById('mainpage').removeChild(helpdivfix);
		}else{
			document.getElementById('pagecontent').removeChild(helpdiv);
			document.getElementById('pagecontent').removeChild(helpdivfix);
		}
		this.showing=false;
	},
	show:function(elementID,itemID){
		if(this.showing){
			this.hide();
		}
		var pos=showPos(elementID);
		var helptext=helpinfo[itemID];
		
		helpdiv=document.createElement('div');
		helpdiv.style.padding='5px';
		helpdiv.style.position='absolute';
		helpdiv.style.left=pos[0]+"px";
		helpdiv.style.top=pos[1]+"px";
		helpdiv.style.zIndex='99';
		helpdiv.innerHTML='<table cellpadding="0" cellspacing="0" style="position:relative;width:400px;">'+
			'<tr height="1" valign="top"><td width="1"><img src="/images/j4c/ctl.gif" /></td><td style="background:#ffffff;border-top:rgb(200,200,200) 1px solid;"><img src="/images/spacer.jpg" /></td><td width="1"><img src="/images/j4c/ctr.gif" /></td></tr>'+
			'<tr>'+
			'<td style="background:#ffffff;border-left:rgb(200,200,200) 1px solid;"><img src="/images/spacer.jpg" /></td>'+
			'<td style="background:#ffffff;padding:5px;">'+
			'<table style="width:100%;"><tr><td><h3 style="margin:0;padding:0;">Help</h3></td><td align="right"><a href="#" onclick="help.hide();return false;">Close</a></td></tr></table>'+
			helptext+
			'</td>'+
			'<td style="background:#ffffff;border-right:rgb(200,200,200) 1px solid;"><img src="/images/spacer.jpg" /></td>'+
			'</tr>'+
			'<tr height="1" valign="bottom"><td><img src="/images/j4c/cbl.gif" /></td><td style="background:#ffffff;border-bottom:rgb(200,200,200) 1px solid;"><img src="/images/spacer.jpg" /></td><td><img src="/images/j4c/cbr.gif" /></td></tr>'+
			'</table>';
		if(document.getElementById('mainpage')){
			document.getElementById('mainpage').appendChild(helpdiv);
		}else{
			document.getElementById('pagecontent').appendChild(helpdiv);
		}
		
		helpdivfix=document.createElement('iframe');
		helpdivfix.frameBorder=0;
		helpdivfix.style.left=pos[0]+"px";
		helpdivfix.style.position='absolute';
		helpdivfix.style.top=pos[1]+"px";
		helpdivfix.style.width="400px";
		helpdivfix.style.zIndex='98';
		
		if(document.getElementById('mainpage')){
			document.getElementById('mainpage').appendChild(helpdivfix);
		}else{
			document.getElementById('pagecontent').appendChild(helpdivfix);
		}
		
		this.showing=true;
	}
}
function retrieveComputedStyle(element,styleProperty){
	var computedStyle=null;
	if(typeof element.currentStyle != "undefined"){
		computedStyle=element.currentStyle;
	}else{
		computedStyle=document.defaultView.getComputedStyle(element,null);
	}
	return computedStyle[styleProperty];
}
function showOptions(){
	if(document.getElementById('subjectList').style.display=='list-item'){
		document.getElementById('subjectList').style.display='none';
		document.getElementById('selectFix').style.display='none';
	}else{
		curX=0;
		curY=0;
		var theElement=document.getElementById('subject');
		var thisheight=parseInt(retrieveComputedStyle(theElement,"height"));
		var thiswidth=parseInt(retrieveComputedStyle(theElement,"width"));
		while(theElement!=null){
			curX+=theElement.offsetLeft;
			curY+=theElement.offsetTop;
			theElement=theElement.offsetParent;
		}
		curY+=thisheight+5;
		
		document.getElementById('selectFix').style.zIndex=4;
		document.getElementById('selectFix').style.width=thiswidth+"px";
		document.getElementById('selectFix').style.left=curX+"px";
		document.getElementById('selectFix').style.top=curY+"px";
		document.getElementById('selectFix').style.display='list-item';
		
		document.getElementById('subjectList').style.zIndex=5;
		document.getElementById('subjectList').style.width=thiswidth+"px";
		document.getElementById('subjectList').style.left=curX+"px";
		document.getElementById('subjectList').style.top=curY+"px";
		document.getElementById('subjectList').style.display='list-item';
	}
}

function selectSubject(details){
	document.getElementById('subject').value=details;
	showOptions();
}	