var navapp = ""; var cnd_speed = 45; //fades the green box and the nav boxes var boxColors = new Array("#FFFFFF", "#ECF3E0", "#DCE7C4", "#CBDCA8", "#BAD18C", "#A9C670", "#98BB54", "#88AF38", "#77A41C", "#669900", "#669900"); var box_end = boxColors.length - 1; var box_timers = new Array; var navColors = new Array("#FFFFFF", "#F5F5F5", "#EBEBEB", "#E0E0E0", "#D6D6D6", "#CCCCCC"); var nav_timers = new Array; var nav_end = navColors.length - 1; function fadeBox(div_name, cnd_num, thing) { var the_div, array_num, timer_name, end, time_out_string; if ((navapp == "MSIE4") || (navapp == "MSIE5")) { the_div = eval("document.all." + div_name + ".style"); } else if (navapp == "NS6") { the_div = eval("document.getElementById('" + div_name + "').style"); } the_div.visibility = "visible"; array_num = eval(thing + "Colors[" + cnd_num + "]"); timer_name = eval(thing + "_timers[" + cnd_num + "]"); end = eval(thing + "_end"); if (cnd_num == end) { clearTimeout(timer_name); } else { the_div.background = array_num; cnd_num++; time_out_string = "fadeBox('" + div_name + "', '" + cnd_num + "', '" + thing + "');"; timer_name = setTimeout(time_out_string, 80); } } var nav2_timers = new Array; function fadeNav(cnd_num) { if (cnd_num == 3) { clearTimeout(nav2_timers[cnd_num]); } else { cnd_num++; if (cnd_num == 1) { fadeBox('services_title', 0, 'nav'); } else if (cnd_num == 2) { fadeBox('work_title', 0, 'nav'); } else if (cnd_num == 3) { fadeBox('contact_title', 0, 'nav'); } time_out_string = "fadeNav('" + cnd_num + "');"; nav2_timers[cnd_num] = setTimeout(time_out_string, 150); } } //drops and fades a single letter var cndColors = new Array("#669900", "#77A41C", "#88AF38", "#98BB54", "#A9C670", "#BAD18C", "#CBDCA8", "#DCE7C4", "#ECF3E0", "#FFFFFF", "#FFFFFF"); var cndPoints = new Array (22, 18, 13, 9, 5, 5, 3, 3, 2, 1); var cndLetters = new Array("c", "o", "d", "e", "d2", "n", "o2", "t", "i", "o3", "n2", "s"); var cnd_timers = new Array; var cnd_end = cndColors.length - 1; function cndMove(letter, cnd_num) { var the_div, time_out_string; if ((navapp == "MSIE4") || (navapp == "MSIE5")) { the_div = eval("document.all." + letter + ".style"); } else if (navapp == "NS6") { the_div = eval("document.getElementById('" + letter + "').style"); } the_div.visibility = "visible"; if (cnd_num >= cnd_end) { clearTimeout(cnd_timers[letter]); //alert(cnd_num); } else { the_div.top = parseInt(the_div.top) + cndPoints[cnd_num]; the_div.color = cndColors[cnd_num]; cnd_num++; time_out_string = "cndMove('" + letter + "', '" + cnd_num + "');"; cnd_timers[letter] = setTimeout(time_out_string, cnd_speed); } } //calls the cndMove function for each letter var anime_timers = new Array; var cnd_interval = 200; var anime_end = cndLetters.length - 1; function cndAnime(cnd_num) { if (cnd_num > anime_end) { clearTimeout(anime_timers[cnd_num]); } else { letter = cndLetters[cnd_num]; cndMove(letter, 0); cnd_num++; time_out_string = "cndAnime('" + cnd_num + "');"; anime_timers[cnd_num] = setTimeout(time_out_string, cnd_interval); } } //fade in refined web soultions var refColors = new Array("#FFFFFF", "#F9ECE0", "#F3DCC4", "#EECBA8", "#E8BA8C", "#E2A970", "#DD9854", "#D78838", "#D2771C", "#CC6600"); var ref_timers = new Array; var ref_end = refColors.length - 1; function fadeRef(div_name, cnd_num) { var the_div, time_out_string; if ((navapp == "MSIE4") || (navapp == "MSIE5")) { the_div = eval("document.all." + div_name + ".style"); } else if (navapp == "NS6") { the_div = eval("document.getElementById('" + div_name + "').style"); } the_div.visibility = "visible"; if (cnd_num < 0) { clearTimeout(ref_timers[cnd_num]); } else { the_div.color = refColors[cnd_num]; cnd_num++; time_out_string = "fadeRef('" + div_name + "', '" + cnd_num + "');"; ref_timers[cnd_num] = setTimeout(time_out_string, cnd_speed); } } //fades stuff in from white to orange var refanime_timers = new Array; function refAnime(cnd_num) { if (cnd_num >= 4) { clearTimeout(refanime_timers[cnd_num]); } else { cnd_num++; if (cnd_num == 1) { fadeRef('refined', '0'); } else if (cnd_num == 2) { fadeRef('web', '0'); } else if (cnd_num == 3) { fadeRef('solutions', '0'); } time_out_string = "refAnime('" + cnd_num + "');"; refanime_timers[cnd_num] = setTimeout(time_out_string, 200); } } //begin color fading functions var div_colors = new Array("#EEEEEE", "#dddddd", "#cccccc", "#bbbbbb", "#aaaaaa", "#999999", "#888888", "#777777", "#666666", "#555555", "#444444", "#333333"); var in_timers = new Array(); var out_timers = new Array(); var loop_speed = 40; var start_fade = div_colors.length - 1; var end_fade = 0; var color_numA = end_fade; var color_numB = start_fade; var div_hide = "home"; function fadeIn(div_name) { var the_div, time_out_string; if ((navapp == "MSIE4") || (navapp == "MSIE5")) { the_div = eval("document.all." + div_name + ".style"); } else if (navapp == "NS6") { the_div = eval("document.getElementById('" + div_name + "').style"); } the_div.visibility = "visible"; if (color_numA >= start_fade) { clearTimeout(in_timers[div_name]); } else { if (in_timers[div_name]) { clearTimeout(in_timers[div_name]); } the_div.color = div_colors[color_numA]; color_numA++; time_out_string = "fadeIn('" + div_name + "');"; in_timers[div_name] = setTimeout(time_out_string, loop_speed); } } function fadeOut(div_name) { var the_div, time_out_string; if ((navapp == "MSIE4") || (navapp == "MSIE5")) { the_div = eval("document.all." + div_hide + ".style"); } else if (navapp == "NS6") { the_div = eval("document.getElementById('" + div_hide + "').style"); } if (color_numB <= end_fade) { clearTimeout(out_timers[div_name]); the_div.visibility = "hidden"; div_hide = div_name; if (color_numA != end_fade) { color_numA = end_fade; fadeIn(div_name); } else { fadeIn(div_name); } } else { if (out_timers[div_name]) { clearTimeout(out_timers[div_name]); } the_div.color = div_colors[color_numB]; //alert(color_numB); color_numB--; time_out_string = "fadeOut('" + div_name + "');"; out_timers[div_name] = setTimeout(time_out_string, loop_speed); } } function chngPage(div_name) { if (div_name == div_hide) { return false; } else if (color_numB != start_fade) { color_numB = start_fade; fadeOut(div_name); } else { fadeOut(div_name); } } //end content text color fading functions //begin pull menu fucntions var movePoints = new Array (10, 10, 10, 10, 10, 8, 8, 7, 6, 5, 4, 3, 3, 2, 2, 1, 1, 0, 0); var move_timers = new Array(); var start_point = 45; var end_point = 145; var start_move = 0; var end_move = movePoints.length - 1; var move_speed = 30; function menuDown(div_name, direction, move_num) { var the_div, time_out_string; if ((navapp == "MSIE4") || (navapp == "MSIE5")) { the_div = eval("document.all." + div_name + ".style"); } else if (navapp == "NS6") { the_div = eval("document.getElementById('" + div_name + "').style"); } if (direction == 'down') { the_div.visibility = "visible"; if (move_num == end_move) { clearTimeout(move_timers[div_name]); the_div.top = end_point; } else { if (move_timers[div_name]) { clearTimeout(move_timers[div_name]); } the_div.top = parseInt(the_div.top) + movePoints[move_num]; move_num++; time_out_string = "menuDown('" + div_name + "', '" + direction + "', '" + move_num + "');"; move_timers[div_name] = setTimeout(time_out_string, move_speed); } } else if (direction == 'up') { if (move_num == start_move) { clearTimeout(move_timers[div_name]); the_div.top = start_point; the_div.visibility = "hidden"; } else { if (move_timers[div_name]) { clearTimeout(move_timers[div_name]); } the_div.top = parseInt(the_div.top) - movePoints[move_num]; move_num--; time_out_string = "menuDown('" + div_name + "', '" + direction + "', '" + move_num + "');"; move_timers[div_name] = setTimeout(time_out_string, move_speed); } } } function pullMenu(div_name, direction) { var the_div; var move_num = 0; if ((navapp == "MSIE4") || (navapp == "MSIE5")) { the_div = eval("document.all." + div_name + ".style"); } else if (navapp == "NS6") { the_div = eval("document.getElementById('" + div_name + "').style"); } if (direction == "down") { move_num = start_move; the_div.top = start_point; menuDown(div_name, direction, move_num); } else if (direction == "up") { move_num = end_move; the_div.top = end_point; menuDown(div_name, direction, move_num); } } function chngBG(layer_id, the_color) { if ((navapp == "MSIE4") || (navapp == "MSIE5")) { eval("document.all." + layer_id + ".style.background='" + the_color + "'"); } else if (navapp == "NS6") { eval("document.getElementById('" + layer_id + "').style.background='" + the_color + "';"); } } //end pulldown menu funtions //starts the intro animation var start_timers = new Array; function startSite(cnd_num) { if (cnd_num == 4) { clearTimeout(start_timers[cnd_num]); } else { cnd_num++; if (cnd_num == 1) { fadeBox('bigbox', 0, 'box'); } else if (cnd_num == 2) { cndAnime(0); } else if (cnd_num == 3) { refAnime(0); } else if (cnd_num == 4) { fadeNav(0); } time_out_string = "startSite('" + cnd_num + "');"; start_timers[cnd_num] = setTimeout(time_out_string, 2000); } } function openCity() { msg=open("/city/index.html","cityContents","toolbar=no,location=no,directories=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width=560,height=310"); } function openRGB() { msg=open("/rgbtrance.php","rgbContents","toolbar=no,location=no,directories=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width=638,height=510"); }