// JavaScript Document


//THESE ARE WHAT YOU WILL EDIT to change out the content in the "Feature Article" section of the homepage.
//		Keep everything that you edit in double quotes!!!!!
//		Make sure that every line ends with a semicolon, as such;
//		Your article and event images must be located in the Images - Maine - homepage folder
// 		The pdf of the current and future issue must be located in the Maine - pdfs folder
// 		Do not edit any code below the giant lines of forward slashes below.



//This is the "feature article" image for the home page. This doesn't usually need to be changed. 
var feat_article_image="featurearticle.jpg";


//This is the heading you would like displayed on the home page for the "feature article." This doesn't usually need to be changed. 
var feat_article_title="Feature Article";


//This is the text for the description of the "feature article."
var feat_article_subtitle="Managing is Hard: The Case for Supervisory Training<br/>by Rick Dacri";


//This is the file that houses the example of the current "feature article," proabably a PDF. This doesn't usually need to be changed. 
var feat_article_link="meFeatureArticle2.pdf";


//This is the "feature event" image for the home page. This doesn't usually need to be changed. 
var feat_event_image="featurevent.jpg";


//This is the heading you would like displayed on the home page for the "feature event."
var feat_event_title="Feature Event";


//This is the text for the description of the "feature event."
var feat_event_subtitle="2010 MSHHRA Conference: HR2 Positioning HR for Healthcare Reform";


//This is the link that you would like the view to go to when they click on the "feature event." It needs to be somewhere on the web and start with http://www.....
var feat_event_link="http://www.myjobwave.com/JobSeekerX/ViewEvent.asp?EventID=367";




////////////////////////// THIS IS WHERE YOU EDIT THE QUICK LINKS ///////////////////////////

// This is the name of the first event you want to show up in the "Quick Links."
var upcoming_event01="Leadership Unplugged: 'Adverse Childhood Experiences: The Impact on Maine's Economy'";

// This is the date of the first event you want to show up in the "Quick Links."
var upcoming_event_date01="June 23rd, 2010. Augusta, ME";

// This is the name of the second event you want to show up in the "Quick Links."
var upcoming_event02="MCDA Annual Conference";

// This is the date of the second event you want to show up in the "Quick Links."
var upcoming_event_date02="June 25th, 2010. Waterville, ME";

// This is the name of the job you want to show up in the "Quick Links."
var new_job01="Search for Jobs on MyJobWave.com";

// This is the company for the first job in the "Quick Links."
var new_job_company01="";




/////// DO NOT EDIT BELOW THIS LINE //////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////







//These Arrays list the possible images and text that can appear in the "Feature Article" section of the homepage.
var picture = new Array()
picture[0]='<a target="blank" href="'+feat_event_link+'"><img class="mainimage" src="Images/Maine/homepage/'+feat_event_image+'" /></a>';
picture[1]='<a href="Maine/pdfs/'+feat_article_link+'"><img class="mainimage" src="Images/Maine/homepage/'+feat_article_image+'" /></a>';

var text = new Array()
text[0] = '<a href="'+feat_event_link+'">'+feat_event_title+'</a>';
text[1] = '<a href="Maine/pdfs/'+feat_article_link+'">'+feat_article_title+'</a>';

 var subtext = new Array()
 subtext[0] = '<a href="'+feat_event_link+'">'+feat_event_subtitle+'</a>';
 subtext[1] = '<a href="Maine/pdfs/'+feat_article_link+'">'+feat_article_subtitle+'</a>';
 
 
//This variable/method chooses a random number that decides which image/text will appear in the "Feature Article" box.

function get_number()
{
var new_number=Math.floor(Math.random()*2);
return new_number
}

var my_number=get_number();





//This fuction tells the directional arrows on the home page which image/text should appear in the Feature spot.
function change_it()
{
	if (my_number==1)
		{
			changeImage(); 
			changeText(); 
			changeDescriptionTwo();
			my_number=0;
		}
		else
		{
			changeImageBack(); 
			changeTextBack(); 
			changeDescriptionBack();
			my_number=1;
		}
}





// This tells the site to change out the current image in the feature-image span and replace it with the feature event pic.

function changeImage()
{
   document.getElementById('featureImage').innerHTML = picture[0];
}



// This function tells the site to change out the current headline in the feature-text paragraph and replace it with the feature event text.

function changeText()
{
   document.getElementById('featureText').innerHTML = text[0];
}


// This function tells the site to replace the current image in the feature-image span and replace with the feature article pic.

function changeImageBack()
{
   document.getElementById('featureImage').innerHTML = picture[1];
}




// This function tells the site to change out the current headline in the feature-text paragraph and replace it with the feature article text.

function changeTextBack()
{
   document.getElementById('featureText').innerHTML = text[1];
}




// This function tells the site to replace the text in the title (really the description) paragraph and replace it with the feature article text.

function changeDescriptionBack()
{
   document.getElementById('title').innerHTML = subtext[1];
}


// This tells the site to replace the text in the title (really the description) paragraph and replace it with the feature event text.

function changeDescriptionTwo()
{
   document.getElementById('title').innerHTML = subtext[0];
}


