/*
   Rewritten as old code does not support flash change requirements for newer flash movies (rewrite by Joe McCormack)
   This rewrite will support new and old flash files.  Creation date: 12.24.03
*/
var the_popup_status = 0; // 0 = disabled, 1 = active
var cookie_title = "shortime";
var cookie_title_value = "hereiam";
var title_font_family = "sans-serif";
var title_font_size = "2";
var title_font_color = "#FFFFFF";
var title_bar_color = "#000000";
var main_content_color = "#DADADA";
var main_border_color = "#BFBFBF";
var main_border_size = "3";
var footer_tab_size = "0";
var def_x = 1024, def_y = 800;
var speed_check = 1; /* Invoke computer speed checking?  This may cause computers to blur window movement when dragging.  1 = yes, 0 = no. */

/* Masters Degree Generalized For Technology (http://www.uat.edu/graduate/) - var body_content_placement = "<a href=\"#\" onmousedown=\"javascript:max_frame();\"><img src=\"/mos_tech.jpg\" border=\"0\" alt=\"Masters Degree\" width=\"280\" height=\"146\" /></a>"; */
/* Masters Degree SWF - var body_content_placement = "<OBJECT classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0\" WIDTH=\"280\" HEIGHT=\"146\" id=\"AnimatedMasters\" ALIGN=\"\"> <PARAM NAME=movie VALUE=\"MastersPopUpFinal.swf\"> <PARAM NAME=quality VALUE=high> <PARAM NAME=bgcolor VALUE=#FFFFFF> <EMBED src=\"MastersPopUpFinal.swf\" quality=high bgcolor=#FFFFFF  WIDTH=\"280\" HEIGHT=\"146\" NAME=\"AnimatedMasters\" ALIGN=\"\" TYPE=\"application/x-shockwave-flash\" PLUGINSPAGE=\"http://www.macromedia.com/go/getflashplayer\"></EMBED></OBJECT><br />"; */
/* Game Degree SWF var body_content_placement = "<OBJECT classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0\" WIDTH=\"280\" HEIGHT=\"146\" id=\"AnimatedMasters\" ALIGN=\"\"> <PARAM NAME=movie VALUE=\"/img/split_banner.swf\"> <PARAM NAME=quality VALUE=high> <PARAM NAME=bgcolor VALUE=#A4001E> <EMBED src=\"/img/split_banner.swf\" quality=high bgcolor=#A4001E  WIDTH=\"280\" HEIGHT=\"146\" NAME=\"AnimatedMasters\" ALIGN=\"\" TYPE=\"application/x-shockwave-flash\" PLUGINSPAGE=\"http://www.macromedia.com/go/getflashplayer\"></EMBED></OBJECT><br />"; */
/* Full Access JPG (http://www.uat.edu/fullaccess/) - var body_content_placement = "<a href=\"#\" onmousedown=\"javascript:max_frame();\"><img src=\"/fullAccessPopUpBox.jpg\" border=\"0\" alt=\"Visit The Full Access Site\" width=\"280\" height=\"146\" /></a>"; */
/* Tech Forum (http://www.uat.edu/techforum/) - */
/* Debono Popup (http://www.uat.edu/debono/) - var body_content_placement = "<a href=\"#\" onmousedown=\"javascript:max_frame();\"><img src=\"/DeBonoPopUpBox.gif\" border=\"0\" alt=\"Professor Debono\" width=\"280\" height=\"146\" /></a>"; */
/* DC480 Popup (http://www.dc480.org/) - var body_content_placement = "<a href=\"#\" onmousedown=\"javascript:max_frame();\"><img src=\"/DC480_popup.jpg\" border=\"0\" alt=\"DC480\" width=\"280\" height=\"146\" /></a>"; */

var body_content_placement = "<a href=\"#\" onmousedown=\"javascript:max_frame();\"><img src=\"http://www.uat.edu/techforumpopup.jpg\" border=\"0\" alt=\"Visit The Tech Forum Site\" width=\"280\" height=\"146\" /></a>";
var the_link = "http://www.uat.edu/techforum/"; /* Current Banner Link Address */
var title_font_text = "Tech Forum";

var the_obj_width = 280;
var the_obj_height = 146;
var the_obj_title_height = 35;
var pop_start_x = 60;
var pop_start_y = 300;
var x_width = 280;
var y_height = 146;
var right_obj_offset = 7; /* Do not use */
var bottom_obj_offset = 40; /* Do not use */
var wideness = 0; /* Do not use */
var tallness = 0; /* Do not use */
var put_it_here = ""; /* Do not use */
var olden_x = 0, olden_y = 0; /* Do not use */
var drift_x = 0, drift_y = 0; /* Do not use */
var imclicked = 0; /* Do not use */
var mouse_status_btn = 0; /* Do not use */
function max_frame() {
/* Get Monitor Size Based On Browser Type ... Bug with Laptops and popup windows */
def_x = document.body.clientWidth; def_y = document.body.clientHeight;
window.open(the_link,"popped","toolbar=1,menubar=1,location=1,status=1,scrollbars=1,resizable=1,width="+def_x+",height="+def_y+"");
}
function hideme() {
if (document.getElementById("whillie")) {
					 whillie.innerHTML = "";
					 whillie.style.visibility = "hidden";
					 document.cookie=cookie_title+"="+cookie_title_value+"; path=/"; /* Keep banner active during surfing until user closes it */
					}
}
function callme() {
if (the_popup_status == 1) {
wideness = document.body.clientWidth;
tallness = document.body.clientHeight;
var have_a_cookie = "false";
if (get_cookie(cookie_title) != cookie_title_value){
have_a_cookie = "true";
}
if (have_a_cookie == "true") {
put_it_here = "<table border=\""+main_border_size+"\" bordercolor=\""+main_border_color+"\" bgcolor=\""+main_content_color+"\" cellpadding=\"0\" cellspacing=\"0\" width=\""+x_width+"\"><tr><td width=\"100%\" bgcolor=\""+title_bar_color+"\"><div id=\"moveme\" onmousedown=\"mouse_flagger();return true;\" onmouseup=\"mouse_flagger();return true;\"><table border=\"0\" cellpadding=\"2\" cellspacing=\"0\" width=\"100%\"><tr><td width=\"75%\" align=\"left\"><font face=\""+title_font_family+"\" size=\""+title_font_size+"\" color=\""+title_font_color+"\"><b>"+title_font_text+"</b></font></td><td width=\"25%\" align=\"right\"><input type=\"button\" onmousedown=\"hideme();\" value=\"X\" style=\"font-weight:bold;\" /></td></tr></table></div></td></tr><tr><td width=\"100%\" bgcolor=\""+main_content_color+"\" valign=\"top\">"+body_content_placement+"</td></tr><tr><td width=\"100%\" bgcolor=\""+main_content_color+"\" height=\""+footer_tab_size+"\"></td></tr></table>";
whillie.innerHTML = put_it_here;
whillie.style.left = pop_start_x;
whillie.style.top = pop_start_y;
whillie.style.visibility = "visible";
                             }
}
}
function get_cookie(Name) {
var search = Name + "=";
var returnvalue = "";
if (document.cookie.length > 0) {
offset = document.cookie.indexOf(search);
if (offset != -1) {
offset += search.length;
end = document.cookie.indexOf(";", offset);
if (end == -1)
end = document.cookie.length;
returnvalue=unescape(document.cookie.substring(offset, end));
}
}
return returnvalue;
}
function uclickedme() {
imclicked = 1; mouse_status_btn = 1;
}
function uleftme() {
imclicked = 0; mouse_status_btn = 0;
}
function mouse_flagger() {
var processed = 0;
if (mouse_status_btn == 0 && processed == 0) { mouse_status_btn = 1; imclicked = 1; processed = 1; }
if (mouse_status_btn == 1 && processed == 0) { mouse_status_btn = 0; imclicked = 0; processed = 1; }
}
function getoutpx(st_value) {
/* This function removes dynamic insertion of characters placed into positional information */
var vstem = new String();  var vcomp = new String(); var vflag = 0;
for (bit = 0; bit < st_value.length; bit++) { vcomp = st_value.charAt(bit); if (vcomp == "p") { vflag = 1; } if (vflag == 0) { vstem += vcomp; vcomp = ""; } if (vcomp == "x") { vflag = 0; } }
return(vstem);
}
function mousedrift() {
var changed_x = 0, changed_y = 0, kimo_x = 0, kimo_y = 0;
olden_x = drift_x; olden_y = drift_y;
drift_x = event.clientX; drift_y = event.clientY;
changed_x = drift_x - olden_x;
changed_y = drift_y - olden_y;
if (document.getElementById("whillie")) {
/* Compensate For Slower Computer Systems */
if (speed_check == 1) {
			if (drift_x < parseInt(whillie.style.left)) { imclicked = 0; mouse_status_btn = 0; }
			if (drift_y < parseInt(whillie.style.top)) { imclicked = 0; mouse_status_btn = 0; }
			if (imclicked == 1) { if (drift_x > (parseInt(whillie.style.left) + the_obj_width)) { imclicked = 0; mouse_status_btn = 0; } }
			if (imclicked == 1) { if (drift_y > (parseInt(whillie.style.top) + the_obj_title_height)) { imclicked = 0; mouse_status_btn = 0; } }
		      }
if (imclicked == 1) {
try { kimo_x = parseInt(whillie.style.left) + changed_x; } catch(onerror) { /* Random Error Catch */ }
try { kimo_y = parseInt(whillie.style.top) + changed_y; } catch(onerror) { /* Random Error Catch */ }
if (kimo_x < 0) { kimo_x = 0; }
if (kimo_y < 0) { kimo_y = 0; }
try { whillie.style.left = kimo_x; } catch(onerror) { /* Random Error Catch */ }
try { whillie.style.top = kimo_y; } catch(onerror) { /* Random Error Catch */ }
/* Bound Region */
if (parseInt(whillie.style.left) < 5) { whillie.style.left = 5; }
if (parseInt(whillie.style.left) > (wideness - (the_obj_width + 5 + right_obj_offset))) { whillie.style.left = wideness - (the_obj_width + 5 + right_obj_offset); }
if (parseInt(whillie.style.top) < 5) { whillie.style.top = 5; }
if (parseInt(whillie.style.top) > (tallness - (the_obj_height + 5 + bottom_obj_offset))) { whillie.style.top = tallness - (the_obj_height + 5 + bottom_obj_offset); }
}
					}
}
/* Spawn Mouse Monitor Event */
document.onmousemove = mousedrift;
document.onmouseup = uleftme;
document.onmousedown = uclickedme;