var submit_button = '<BR><BR><CENTER><INPUT TYPE="button" ID="cancel" NAME="cancel" VALUE="Close" CLASS="buttons" onClick="CloseError('+"'"+'filterdiv'+"'"+','+"'"+'errordiv'+"'"+','+"'"+'document.indexdiv.'+"'"+');" /></CENTER>';
var sJobDesc = '<center><B><span style="font-size:12pt;">Hampton Roads Eye Associates - Hampton<BR>is a busy multi-physician practice to include: General Ophthalmology,<BR>Glaucoma, Laser Vision Correction, Contacts and Retinal Care.</span>';
	sJobDesc += '<BR><BR>Qualifications:</B><BR>High School Graduate<BR>Ophthalmology Experience Required<BR>Ophthalmic Certification Preferred but not required.';
	sJobDesc += '<BR><BR><B>Job Requirements:</B><BR>To obtain a Complete Medical and Ophthalmology History<BR>Visual Acuities<BR>Humphrey Visual Fields<BR>Refractometry<BR>Applanation Tonometry<BR>Keratometry<BR>Slit Lamp Exams';
	sJobDesc += '<BR><BR><B>We are seeking a qualified full time Ophthalmic Technician/Assistant to join our<BR>team.  Our office offers competitive salaries and bonuses and will cover<BR>continuing education and certification fees.  We are located in a brand new<BR>medical facility in Hampton, Virginia.</B>';
	sJobDesc += '<BR><BR>Please contact Katherine Gibbons, Office Manager at:<BR>757-838-4500<BR><A href="mailto:Katherine.gibbons@rivhs.com">Katherine.gibbons@rivhs.com</A>';

function OpenJob()
{
	sText = sJobDesc + submit_button;
	WriteLayer(sText,'errordiv','');
	OpenError('filterdiv','errordiv','');
}

function WriteLayer(sText,obj,nest)
{ 
	var evnt = document.getElementById?document.getElementById(obj):document.all?document.all[obj]:document.layers?eval(nest+'document.'+obj):0;	
	if (document.layers)
	{ 
		evnt.document.open(); 
		evnt.document.write(sText); 
		evnt.document.close(); 
	} 
	else 
	{ 
		evnt.innerHTML = sText; 
	} 
} 

function OpenError(obj1,obj2,nest)
{
	var evnt = document.getElementById?document.getElementById(obj1):document.all?document.all[obj1]:document.layers?eval(nest+'document.'+obj1):0;
	var css = evnt.style?evnt.style:evnt;	
	var evnt2 = document.getElementById?document.getElementById(obj2):document.all?document.all[obj2]:document.layers?eval(nest+'document.'+obj2):0;
	var css2 = evnt2.style?evnt2.style:evnt2;
	
	var myWidth = 0, myHeight = 0;
	if( typeof( window.innerWidth ) == 'number' )
	{
		//Non-IE
		myWidth = window.innerWidth;
		myHeight = window.innerHeight;
	}
	else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) )
	{
		//IE 6+ in 'standards compliant mode'
		myWidth = document.documentElement.clientWidth;
		myHeight = document.documentElement.clientHeight;
	}
	else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) )
	{
		//IE 4 compatible
		myWidth = document.body.clientWidth;
		myHeight = document.body.clientHeight;
	}

	//set filter width and height
	css.width=myWidth;
	css.height=myHeight;
	
	//set error width and height
	error_width = 555;
	error_height = 460;
	
	if (myWidth < error_width)
		error_width = myWidth;
			
	if (myHeight < error_height)
		error_height = myHeight;
		
	css2.width = error_width;
	css2.height = error_height;	
	
	//center error
	if (document.all)
	{
		css2.pixelLeft = ((myWidth - error_width) / 2);
		css2.pixelTop = ((document.body.scrollTop + (myHeight - error_height)) / 2 );
	}
	else if (document.layers)
	{
		css2.left = ((myWidth - error_width - 15) / 2);
		css2.top = ( (window.pageYOffset + (myHeight - error_height - 15)) / 2);
	}
	else if (document.getElementById)
	{
		css2.left = ((myWidth - error_width - 20) / 2) + 'px';
		css2.top = ( (window.pageYOffset + (myHeight - error_height - 20)) / 2) + 'px';
	}
	
	css.visibility='visible';
	css.display='block';
	css2.visibility='visible';
	css2.display='block';
}

function CloseError(obj1,obj2,nest)
{
	sText = "";
	WriteLayer(sText,obj2,nest);
	
	var evnt = document.getElementById?document.getElementById(obj1):document.all?document.all[obj1]:document.layers?eval(nest+'document.'+obj1):0;
	var css = evnt.style?evnt.style:evnt;	
	var evnt2 = document.getElementById?document.getElementById(obj2):document.all?document.all[obj2]:document.layers?eval(nest+'document.'+obj2):0;
	var css2 = evnt2.style?evnt2.style:evnt2;

	css2.visibility='hidden';
	css2.display='none';
	css.visibility='hidden';
	css.display='none';
}