/* trapped in amadassociates */

// if (self.location == top.location)
// top.location.href = 'default.asp' // default.asp is the file name of the frameset

// change default.asp to http://www.amadassociates.com/ after upload!

// print

function print_it() { 
var disp_setting="toolbar=yes,location=no,directories=yes,menubar=yes,"; 
	disp_setting+="scrollbars=yes,width=770,height=550,left=100,top=100"; 
var content_vlue=document.getElementById("print_content").innerHTML; 
  
var docprint=window.open("","",disp_setting); 
	docprint.document.open(); 
	docprint.document.write('<html><head><title>AmadAssociates Group Print System<\/title>'); 
	docprint.document.write('<link rel="stylesheet" href="common.css" type="text\/css" \/>'); 
	docprint.document.write('<link rel="stylesheet" href="default.css" type="text\/css" \/>'); 
	docprint.document.write('<\/head><body onLoad="self.print()">');          
	docprint.document.write(content_vlue);          
	docprint.document.write('<\/body><\/html>'); 
	docprint.document.close(); 
	docprint.focus(); 
}

// available height right width 730

var avhr = null;
var ah = screen.availHeight;
leftpos = 0;

if (screen) {
leftpos = screen.width-730
}

function launchHTML (avhr_url) {
avhr = window.open(avhr_url, 'avhr_name', 'width=730,height='+ah+',screenX='+leftpos+',left='+leftpos+',screenY=0,top=0,scrollbars=1')
}

// link in new window

function externalLinks() {
 if (!document.getElementsByTagName) return;
 var anchors = document.getElementsByTagName("a");
 for (var i=0; i<anchors.length; i++) {
   var anchor = anchors[i];
   if (anchor.getAttribute("href") &&
       anchor.getAttribute("rel") == "external")
     anchor.target = "_blank";
 }
}
window.onload = externalLinks;

// Open window center

var winmid = null;

function winmiddle(url, name, w, h, scroll) {
var winw = (screen.width-w)/2;
var winh = (screen.height-h)/2;

var winprop  = 'height='+h+',';
winprop += 'width='+w+',';
winprop += 'top='+winh+',';
winprop += 'left='+winw+',';
winprop += 'scrollbars='+scroll+',';
winprop += 'resizable=no';

winmid = window.open(url, name, winprop);

if(parseInt(navigator.appVersion) >= 4) {
winmid.window.focus();
}
}

// no right click

var message="";

function clickIE() {if (document.all) {(message);return false;}}
function clickNS(e) {if 
(document.layers||(document.getElementById&&!document.all)) {
if (e.which==2||e.which==3) {(message);return false;}}}
if (document.layers) 
{document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;}
else{document.onmouseup=clickNS;document.oncontextmenu=clickIE;}

document.oncontextmenu=new Function("return false")