// JavaScript Document
function GetRandomDrill() {

	var drillDIV = document.getElementById("drills");
	var drillNum = (Math.ceil(Math.random()*3));
	var imgFile = "";
	var imgText = "";
		
	if(drillNum == 1) {
		imgFile = "car_fire_drill_2.jpg";
		imgText = "Auto Fire Drill";
	} else if(drillNum == 2) {
		imgFile = "car_fire_drill_3.jpg";
		imgText = "Auto Fire Drill";	
	} else if(drillNum == 3) {
		imgFile = "jaws_of_life.jpg";
		imgText = "Jaws of Life";		
	}
		
	drillDIV.innerHTML = "<img src='images/drills/" + imgFile + "' alt='Drills'>";	
	drillDIV.innerHTML += "<br>" + imgText;

}


function GetFirePreventionTips() {

	var FireSource = new Array();
	FireSource[0] = "Kitchen grease";
	FireSource[1] = "Lightning";
	FireSource[2] = "Unattended burning candles or kerosene lamps";
	FireSource[3] = "Electrical short circuits";
	FireSource[4] = "Overheated appliances";
	FireSource[5] = "Neglected camp fires";
	FireSource[6] = "Arson";
	
	var ElecCheck = new Array();
	ElecCheck[0] = "Do not leave your electric iron plugged in.";
	ElecCheck[1] = "Avoid “octopus” connections.";
	ElecCheck[2] = "Read and follow appliance precautions and instructions.";
	ElecCheck[3] = "Give appliances plenty of air to prevent overheating.";
	ElecCheck[4] = "During brownouts / blackouts, cut off all electrical connections. To be safe, pull down the main switch.";
	ElecCheck[5] = "Don’t drape electrical wiring over pipes, nails, etc.";
	ElecCheck[6] = "Make sure there are no electrical cords trailing across the floor or under rugs.";

	var Kitchen = new Array();
	Kitchen[0] = "Don’t leave the stove while cooking";
	Kitchen[1] = "Always turn off the stove after cooking";
	Kitchen[2] = "Do not let your pressure cooker boil dry";
	Kitchen[3] = "Keep your heat producing appliances clean. Old food particles and greasy build up can ignite.";
	Kitchen[4] = "Don’t heat wax, paints and other polishing substances over open fire.";
	Kitchen[5] = "Always check your kitchen before going to sleep. Remember, most fires in the home occur at night.";
	Kitchen[6] = "When a leak is detected in any gas appliance have it repaired or replaced immediately.";

	var Children = new Array();
	Children[0] = "Children should know how and when to dial 911";
	Children[1] = "Keep matches & lighters away from children, store them in a locked cabinet.";
	Children[2] = "Never leave children unattended or locked up in the house alone.";
	Children[3] = "Allow only mature and dependable companions to stay with them while you’re away.";
	Children[4] = "Don’t allow children to play near bonfires.";
	Children[5] = "When purchasing clothing for your children, avoid flimsy, fast burning fabrics.";
	Children[6] = "Keep electrical outlets protected and covered."

	var fireDIV = document.getElementById("firePreventionTips");
	var topicNum = (Math.ceil(Math.random()*4));
	var tipNum = (Math.ceil(Math.random()*7));
	tipNum = tipNum - 1;
	
	if(topicNum==1) {
		fireDIV.innerHTML = "<strong>Common Sources of Fire</strong><br>";
		fireDIV.innerHTML += FireSource[tipNum];
	} else if(topicNum==2) {
		fireDIV.innerHTML = "<strong>Electrical Checklist</strong><br>";	
		fireDIV.innerHTML += ElecCheck[tipNum];		
	} else if(topicNum==3) {
		fireDIV.innerHTML = "<strong>Kitchen Safety</strong><br>";		
		fireDIV.innerHTML += Kitchen[tipNum];		
	} else if(topicNum==4) {
		fireDIV.innerHTML = "<strong>Child Safety</strong><br>";		
		fireDIV.innerHTML += Children[tipNum];		
	}
	
}