function soopaSetup() {
	var resim, shxs, snxs;
	for (var ix = 0; (resim = document.images[ix]); ix++) {
		if (resim.getAttribute) {
			snxs = resim.getAttribute("src");shxs = resim.getAttribute("hsrc");
			if (snxs != "" && snxs != null) {
				resim.nx = new Image();resim.nx.src = resim.src;
				if (shxs != "" && shxs != null) { resim.hx = new Image();resim.hx.src = shxs;resim.onmouseover = soopaSwapOn;resim.onmouseout  = soopaSwapOff; }
			}
		}
	}
}

function soopaSwapOn() {this.src = this.hx.src;}
function soopaSwapOff() {this.src  = this.nx.src;}
function soopaSwapUp() {
	var ths = soopaSwapUp.resim;ths.src = ths.nx.src;
	if (ths.temp) document.onmouseup = ths.temp;
}

var dragapproved=false
var minrestore=0
var initialwidth,initialheight
var ie5=document.all&&document.getElementById
var ns6=document.getElementById&&!document.all

function iecompattest(){
return (!window.opera && document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function drag_drop(e){
if (ie5&&dragapproved&&event.button==1){
document.getElementById("dwindow").style.left=tempx+event.clientX-offsetx+"px"
document.getElementById("dwindow").style.top=tempy+event.clientY-offsety+"px"
}
else if (ns6&&dragapproved){
document.getElementById("dwindow").style.left=tempx+e.clientX-offsetx+"px"
document.getElementById("dwindow").style.top=tempy+e.clientY-offsety+"px"
}
}

function initializedrag(e){
offsetx=ie5? event.clientX : e.clientX
offsety=ie5? event.clientY : e.clientY
document.getElementById("dwindowcontent").style.display="none" //extra
tempx=parseInt(document.getElementById("dwindow").style.left)
tempy=parseInt(document.getElementById("dwindow").style.top)

dragapproved=true
document.getElementById("dwindow").onmousemove=drag_drop
}

isNav = false;
newerBrowser = false;

if ( parseInt( navigator.appVersion ) >= 4 ) {
  newerBrowser = true;
  if ( navigator.appName == "Netscape" ) {
    isNav = true;
    window.captureEvents( Event.RESIZE );
    window.onresize = checkSize();
  }
}

function loadwindow(page, w, h, name, scrollbars) {
		var size;
		name = "resim";scrollbars="no";
		if (w == -1 && h==-1) { w=screen.availWidth-100; h=screen.availHeight-100;}
		size = "width="+w+",height="+h;
		remote = window.open("",name,size + ",status=yes,toolbar=no,menubar=no,scrollbars="+scrollbars);
		remote.moveTo(screen.availWidth / 2 - w/2,screen.availHeight / 2 - h/2 - 20);
		remote.location.href = page;
		if (remote.opener == null) { remote.opener = window; }
		remote.opener.name = "opener";
   	}


function loadwindowx(url,w,h){
if (!ie5&&!ns6)
window.open(url,"","width=w,height=h,scrollbars=1")
else{
  if ( newerBrowser ) {
    var pgx;
    var pgy;
    if ( isNav ) {
      pgx = window.innerWidth;
      pgy = window.innerHeight;
    }
    else {
      pgx = document.body.clientWidth;
      pgy = document.body.clientHeight;
    }
  }
document.getElementById("dwindow").style.display=''
document.getElementById("dwindow").style.width=initialwidth=w+"px"
document.getElementById("dwindow").style.height=initialheight=h+"px"
document.getElementById("dwindow").style.left=pgx/2 - w/2;
document.getElementById("dwindow").style.top=pgy/2  - h/2;
document.getElementById("cframe").src=url
}
}

function closeit(){
document.getElementById("cframe").src="";
document.getElementById("dwindow").style.display="none"
}

function stopdrag(){
dragapproved=false;
document.getElementById("dwindow").onmousemove=null;
document.getElementById("dwindowcontent").style.display="" //extra
}
