/*  
INSTRUCTIONS FOR USE


There are 3 template types.  Each type is assigned a letter.  Whenever a campaign is to be added, you must create an image in each of the following three dimensions and provide the full URL to where the image can be found.  It is imperative that the full URL be given, as the images will most likely not be copied to every single hospital's own website, but will instead be located on a different server...such as the webapps.chs.net server.

Letter   Image Dimensions
  A         474x220
  B         493x321
  C         378x240
  
Once the URL is provided in the first set of quotes, you may input the URL of the page where the image should link.  

LINK TO A PAGE WITHIN THE HOSPITAL'S OWN WEBSITE
If it is a page within the hospital's own site, it must be a RELATIVE path, meaning you do not use (as an example) http://www.brandywinehospital.com/Nominations.  Leave out the hospital's website and only use the directory path.

EXAMPLE
fadeimages.push(["http://nominations.chs.net/Images/banner_A.jpg", "/Nominations", ""]) //plain image syntax

LINK TO A PAGE ON A DIFFERENT WEBSITE
If the link should go to a page outside of the hospital's website, use the full URL path, and instruct the user's web browser to open the link in a new window by placing "_new" (be sure to include the underscore character) within the third set of quotes.

EXAMPLE
fadeimages.push(["http://webapps.chs.net/Surveys/images/banner_A.jpg", "http://www.surveymonkey.com/CHS/survey1.html", "_new"]) //plain image syntax



THIS PROCEDURE MUST BE REPLICATED FOR EACH OF THE THREE TEMPLATE TYPE ENTRIES.




ADDING MORE THAN ONE IMAGE TO EACH TEMPLATE
This script is designed to allow an infinite number of additional rotating slides.  Simply copy/paste a new line and adjust the code accordingly.
In the below example, Template A would add 2 additional images, each linking to a different webpage.  The second link would need to be added to each of the three templates and have the banner image adjusted accordingly.


EXAMPLE
if (TemplateType == "A"){

fadeimages.push(["http://nominations.chs.net/Images/banner_A.jpg", "/Nominations", ""]) //plain image syntax
fadeimages.push(["http://webapps.chs.net/Survey/images/banner_A.jpg", "http://www.surveymonkey.com/CHS/survey1.html", "_new"]) //plain image syntax

}



REMOVING IMAGES FROM THE ROTATION.

Remove an image from the rotation by placing two forward slashes ( "//" ) before each of the fadeimages.push lines.  This comments out the line of code, effectively disabling it, while still allowing you to edit the line of code for later use by changing the image info and simply removing the two slashes in order to re-enable it.
*/


<!--Pulls hospital's Domain name and chops off the TLD, then formats the URL for the Staywell site
var temp = new Array();
temp = Hospital.split('.');
var imagelink = '';
var subdirectory = '/RelatedItems/42,BreastCancerRisk';
imagelink ='http://' + temp[0] + '.staywellsolutionsonline.com' + subdirectory

//Below is how to include the Staywell URL  (note the imagelink variable is NOT enclosed in quotes
//fadeimages.unshift(["http://webapps.chs.net/Slideshow/Images/BreastCancerAwareness2009/Template1.jpg", imagelink, ""]) //plain image syntax



/*********************************************************

       FOR A MASS-CHANGE TO ALL CHS CORPORATE SITES

*********************************************************/

if (TemplateType == "A"){

fadeimages.unshift(["http://webapps.chs.net/Slideshow/Images/BreakingNews/SwineFlubanner_A.jpg", "/BreakingNews", ""]) //plain image syntax


}
else if (TemplateType == "B"){
fadeimages.unshift(["http://webapps.chs.net/Slideshow/Images/BreakingNews/SwineFlubanner_B.jpg", "/BreakingNews", ""]) //plain image syntax



}
else if (TemplateType == "C"){
fadeimages.unshift(["http://webapps.chs.net/Slideshow/Images/BreakingNews/SwineFlubanner_C.jpg", "/BreakingNews", ""]) //plain image syntax



}
else{
//This means the site does not fit into any of the three templates, and so should do nothing	
}

/*********************************************************

       END OF PORTION FOR ALL CHS CORPORATE SITES

*********************************************************/







/*********************************************************

       FOR A MASS-CHANGE TO ONLY SELECT CHS CORPORATE SITES


Other variables used besides TemplateType:

-Division: Defined by the hospital's division as a numeral.  Example- 3

*****
Enhancement by T.A. on 08/21/09
Corporate-wide sites like Seniorcircle.com use "0"(zero) as their Division declaration in their local SlideshowInfo.js file
****

-Hospital: Defined by the hospital's domain name WITHOUT using the http://www portion of the address.  Example- todaysgateway.com

You must use the same structure as if it were going to all of the hospitals, but may make further if statements inside of the TemplateType statements to narrow down the affected websites even further.

EXAMPLE-
To deploy to only a certain Division of hospitals (Division III in this case), you would use the following code within each of the TemplateType statements:

if (TemplateType == "A"){
if(Division == "3"){
//fadeimages.push(["http://nominations.chs.net/Images/banner_A.jpg", "/Nominations", ""]) //plain image syntax
}
}

*********************************************************/

if (TemplateType == "A"){

if(Hospital == "todaysgateway.com"){
//fadeimages.push(["http://nominations.chs.net/Images/banner_A.jpg", "/Nominations", ""]) //plain image syntax
}
}
else if (TemplateType == "B"){

if(Hospital == "todaysgateway.com"){
fadeimages.push(["http://webapps.chs.net/Slideshow/Images/banner_b_ER.jpg", "/ER", ""]) //plain image syntax
}

}
else if (TemplateType == "C"){
if(Hospital == "todaysgateway.com"){
//fadeimages.push(["http://nominations.chs.net/Images/banner_C.jpg", "/Nominations", ""]) //plain image syntax
}
}
else{
//This means the site does not fit into any of the three templates, and so should do nothing	
}