function winfocus() {
  window.focus();
}


conGen=function(fname,w,h,bgc){
	var conTags = '<td><OBJECT CLASSID="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'
	+ 'WIDTH="'+w+'" HEIGHT="'+h+'"'
	+ 'CODEBASE="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab">'
	+ '<PARAM NAME="MOVIE" VALUE="'+fname+'.swf">'
	+ '<PARAM NAME="PLAY" VALUE="true">'
	+ '<PARAM NAME="LOOP" VALUE="false">'
	+ '<PARAM NAME="QUALITY" VALUE="best">'
	+ '<PARAM NAME="MENU" VALUE="false">'
	+ '<PARAM NAME="BGCOLOR" VALUE="'+bgc+'">'
	+ '<EMBED SRC="'+fname+'.swf"'
	+ 'WIDTH="'+w+'" HEIGHT="'+h+'"'
	+ 'PLAY="true"'
	+ 'BGCOLOR="'+bgc+'"'
	+ 'LOOP="false"'
	+ 'QUALITY="best"'
	+ 'MENU="false"'
	+ 'TYPE="application/x-shockwave-flash"'
	+ 'PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash">'
	+ '</EMBED>'
	+ '</OBJECT></td>';
	
	document.write(conTags);   // embed the flash movie
}

function zoom(code) {
    winX = 500;
	winY = 550;
	winUrl = 'zoom.asp?code='+code;
	winName = "box";
	winFeatures = 'scrollbars=0,resizable=no,toolbar=no,location=no,directories=no,status=no,menubar=no,copyhistory=no';
	winTop = (screen.height-winY)/2-25;
	winLeft = (screen.width-winX)/2;
	newWin = window.open(winUrl,winName,'width='+winX+',height='+winY+',top='+winTop+',left='+winLeft+','+winFeatures);
	newWin.focus();
}

function zoom_press(code) {
    winX = 500;
	winY = 550;
	winUrl = 'zoom_press.asp?code='+code;
	winName = "box";
	winFeatures = 'scrollbars=0,resizable=no,toolbar=no,location=no,directories=no,status=no,menubar=no,copyhistory=no';
	winTop = (screen.height-winY)/2-25;
	winLeft = (screen.width-winX)/2;
	newWin = window.open(winUrl,winName,'width='+winX+',height='+winY+',top='+winTop+',left='+winLeft+','+winFeatures);
	newWin.focus();
}

function clients() {
    winX = 500;
	winY = 550;
	winUrl = 'clients.asp';
	winName = "box";
	winFeatures = 'scrollbars=0,resizable=no,toolbar=no,location=no,directories=no,status=no,menubar=no,copyhistory=no';
	winTop = (screen.height-winY)/2-25;
	winLeft = (screen.width-winX)/2;
	newWin = window.open(winUrl,winName,'width='+winX+',height='+winY+',top='+winTop+',left='+winLeft+','+winFeatures);
	newWin.focus();
}

function news() {
    winX = 400;
	winY = 400;
	winUrl = 'news.html';
	winName = "box";
	winFeatures = 'scrollbars=1,resizable=no,toolbar=no,location=no,directories=no,status=no,menubar=no,copyhistory=no';
	winTop = (screen.height-winY)/2-25;
	winLeft = (screen.width-winX)/2;
	newWin = window.open(winUrl,winName,'width='+winX+',height='+winY+',top='+winTop+',left='+winLeft+','+winFeatures);
	newWin.focus();
}

function reps() {
    winX = 500;
	winY = 550;
	winUrl = 'reps.asp';
	winName = "box";
	winFeatures = 'scrollbars=0,resizable=no,toolbar=no,location=no,directories=no,status=no,menubar=no,copyhistory=no';
	winTop = (screen.height-winY)/2-25;
	winLeft = (screen.width-winX)/2;
	newWin = window.open(winUrl,winName,'width='+winX+',height='+winY+',top='+winTop+',left='+winLeft+','+winFeatures);
	newWin.focus();
}

function feature() {
    winX = 500;
	winY = 500;
	winUrl = 'feature.html';
	winName = "feature";
	winFeatures = 'scrollbars=0,resizable=no,toolbar=no,location=no,directories=no,status=no,menubar=no,copyhistory=no';
	winTop = (screen.height-winY)/2-25;
	winLeft = (screen.width-winX)/2;
	newWin = window.open(winUrl,winName,'width='+winX+',height='+winY+',top='+winTop+',left='+winLeft+','+winFeatures);
	newWin.focus();
}

function zoom_rest(code) {
    winX = 700;
	winY = 550;
	winUrl = 'zoom_rest.asp?code='+code;
	winName = "box";
	winFeatures = 'scrollbars=0,resizable=no,toolbar=no,location=no,directories=no,status=no,menubar=no,copyhistory=no';
	winTop = (screen.height-winY)/2-25;
	winLeft = (screen.width-winX)/2;
	newWin = window.open(winUrl,winName,'width='+winX+',height='+winY+',top='+winTop+',left='+winLeft+','+winFeatures);
	newWin.focus();
}

function postoffice(code) {
    winX = 300;
	winY = 300;
	winUrl = 'postoffice.asp?code='+code;
	winName = "box";
	winFeatures = 'scrollbars=0,resizable=no,toolbar=no,location=no,directories=no,status=no,menubar=no,copyhistory=no';
	winTop = (screen.height-winY)/2-25;
	winLeft = (screen.width-winX)/2;
	newWin = window.open(winUrl,winName,'width='+winX+',height='+winY+',top='+winTop+',left='+winLeft+','+winFeatures);
	newWin.focus();
}

function launchpad(){
winX = 1024;
winY = 768;
winUrl = 'home.html';
winName = "_home";
winFeatures = 'scrollbars=0,resizable=yes,toolbar=no,location=no,directories=no,status=no,menubar=no,copyhistory=no';
winTop = (screen.height-winY)/2-25;
winLeft = (screen.width-winX)/2;
if (screen.width==800||screen.height==600) //if 800x600
	window.open("home.html","_home","status=no,toolbar=0,location=0,directories=0,menuBar=0,scrollbars=0,resizable=0,width=787,height=580,left=0,top=0");
else if (screen.width==640||screen.height==480) //if 640x480
	window.open("home.html","_home","status=no,toolbar=0,location=0,directories=0,menuBar=0,scrollbars=0,resizable=0,width=790,height=480,left=0,top=0");
else if (screen.width==1024||screen.height==768) //if 1024x768
	window.open("home.html","_home","status=no,toolbar=0,location=0,directories=0,menuBar=0,scrollbars=0,resizable=0,width=1024,height=768,left=0,top=0");
else if (screen.width==1152||screen.height==864)//if all else
	window.open("home.html","_home","status=yes,toolbar=0,location=0,directories=0,menuBar=0,scrollbars=0,resizable=0,width=1150,height=864,left=0,top=0");
else //if all else
	window.open(winUrl,winName,'width='+winX+',height='+winY+',top='+winTop+',left='+winLeft+','+winFeatures);
}