
var message="Sorry, right-click has been disabled";
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");



function winNoScroll(winUrl, winName, winWidth, winHeight, winX, winY) {
	var winFeatures = "width=" + winWidth + ",height=" + winHeight + ",scrollbars=no";
	if(arguments.length == 4){ openMainWin(winUrl, winName, winFeatures, 0, 0); }
	else{ openMainWin(winUrl, winName, winFeatures, winX, winY); }
}

function winScroll(winUrl, winName, winWidth, winHeight, winX, winY) {
	var winFeatures = "width=" + winWidth + ",height=" + winHeight + ",scrollbars=yes";
	if(arguments.length == 4){ openMainWin(winUrl, winName, winFeatures, 0, 0); }
	else{ openMainWin(winUrl, winName, winFeatures, winX, winY); }
}

function winCtrScrl(winUrl, winName, winWidth, winHeight) {
	var winFeatures = "width=" + winWidth + ",height=" + winHeight + ",scrollbars=yes";
 	var screenH = screen.availHeight;
 	var screenW = screen.availWidth;
 	var moveX = ((screenW - winWidth)/2)-5;
 	var moveY = ((screenH - winHeight)/2)-14;
	openMainWin(winUrl, winName, winFeatures, moveX, moveY);
}

function winCtrNoScrl(winUrl, winName, winWidth, winHeight) {
	var winFeatures = "width=" + winWidth + ",height=" + winHeight + ",scrollbars=no";
 	var screenH = screen.availHeight;
 	var screenW = screen.availWidth;
 	var moveX = ((screenW - winWidth)/2)-15;
 	var moveY = ((screenH - winHeight)/2)-14;
	openMainWin(winUrl, winName, winFeatures, moveX, moveY);
}

function winCtrScrlShift(winUrl, winName, winWidth, winHeight, shiftX, shiftY) {
	var winFeatures = "width=" + winWidth + ",height=" + winHeight + ",scrollbars=yes";
 	var screenH = screen.availHeight;
 	var screenW = screen.availWidth;
 	var moveX = ((screenW - winWidth)/2)-17;
        moveX += shiftX;
 	var moveY = ((screenH - winHeight)/2)-14;
        moveY += shiftY;
    var browser = navigator.appName;
    if(browser == "Netscape" && navigator.appVersion.substring(0,1) < 5){
                
        //Windows classic theme
        if(screen.width == 1280 && screen.availHeight !=1024){ moveX -= 2; moveY += 15; } //done
        if(screen.width == 1152 && screen.availHeight != 864){ moveX -= 7; moveY += 17;} //done
        if(screen.width == 1024 && screen.availHeight != 768){ moveX -= 3;  moveY += 17; } //done
        if(screen.width == 800 && screen.availHeight != 600){ moveX -= 2; moveY -= 4; } //done
        
        //Windows XP theme
        if(screen.width == 1280 && screen.availHeight ==1024){ moveX -= 1; moveY += 4; } //done
        if(screen.width == 1152 && screen.availHeight == 864){ moveX -= 5; } //done
        if(screen.width == 1024 && screen.availHeight == 768){ moveX -= 1; } //done
        if(screen.width == 800 && screen.availHeight == 600){ moveX -= 1; moveY -= 14; } //done
    }
    
    //alert(moveX + "  " + moveY);
	openMainWin(winUrl, winName, winFeatures, moveX, moveY);
}

function winCtrNoScrlShift(winUrl, winName, winWidth, winHeight, shiftX, shiftY) {
	var winFeatures = "width=" + winWidth + ",height=" + winHeight + ",scrollbars=no";
 	var screenH = screen.availHeight;
 	var screenW = screen.availWidth;
 	var moveX = ((screenW - winWidth)/2)-17;
        moveX += parseInt(shiftX);
 	var moveY = ((screenH - winHeight)/2)-14;
        moveY += parseInt(shiftY);
    var browser = navigator.appName;
    if(browser == "Netscape" && navigator.appVersion.substring(0,1) < 5){
        
        //Windows classic theme
        if(screen.width == 1280 && screen.availHeight !=1024){ moveX -= 2; moveY += 15; } //done
        if(screen.width == 1152 && screen.availHeight != 864){ moveX -= 7; moveY += 17;} //done
        if(screen.width == 1024 && screen.availHeight != 768){ moveX -= 3;  moveY += 17;} //done
        if(screen.width == 800 && screen.availHeight != 600){ moveX -= 2; moveY -= 4; } //done
        
        //Windows XP theme
        if(screen.width == 1280 && screen.availHeight ==1024){ moveX -= 1; moveY += 4; } //done
        if(screen.width == 1152 && screen.availHeight == 864){ moveX -= 5; } //done
        if(screen.width == 1024 && screen.availHeight == 768){ moveX -= 1; } //done
        if(screen.width == 800 && screen.availHeight == 600){ moveX -= 1; moveY -= 14; } //done
    }
    
    //alert(moveX + "  " + moveY);
	openMainWin(winUrl, winName, winFeatures, moveX, moveY);
}

function openMainWin(mstURL, mstName, mstFeatures, mstX, mstY) {
	var openWindow = window.open("", mstName, mstFeatures);
    openWindow.moveTo(mstX, mstY);
	openWindow.location.href = mstURL;
	return openWindow;
}

function ClosePopUp(){
	top.window.opener.focus();
	top.window.self.close();
}







function toggle(sAnchor, sTxt) {
	var ele = document.getElementById(sAnchor);
	var text = document.getElementById(sTxt);
	if(ele.style.display == "block") {
    		ele.style.display = "none";
		text.innerHTML = "<img src='images/plus_sign.gif' width=13 height=13> Expand...";
  	}
	else {
		ele.style.display = "block";
		text.innerHTML = "<img src='images/minus_sign.gif' width=13 height=13> Close...";
	}
}



/******************************************
* Popup Box- By Jim Silver @ jimsilver47@yahoo.com
* Visit http://www.dynamicdrive.com/ for full source code
* This notice must stay intact for use
******************************************/

var ns4=document.layers
var ie4=document.all
var ns6=document.getElementById&&!document.all

//drag drop function for NS 4////
/////////////////////////////////

var dragswitch=0
var nsx
var nsy
var nstemp

function drag_dropns(name){
if (!ns4)
return
temp=eval(name)
temp.captureEvents(Event.MOUSEDOWN | Event.MOUSEUP)
temp.onmousedown=gons
temp.onmousemove=dragns
temp.onmouseup=stopns
}

function gons(e){
temp.captureEvents(Event.MOUSEMOVE)
nsx=e.x
nsy=e.y
}
function dragns(e){
if (dragswitch==1){
temp.moveBy(e.x-nsx,e.y-nsy)
return false
}
}

function stopns(){
temp.releaseEvents(Event.MOUSEMOVE)
}

//drag drop function for ie4+ and NS6////
/////////////////////////////////


function drag_drop(e){
if (ie4&&dragapproved){
crossobj.style.left=tempx+event.clientX-offsetx
crossobj.style.top=tempy+event.clientY-offsety
return false
}
else if (ns6&&dragapproved){
crossobj.style.left=tempx+e.clientX-offsetx+"px"
crossobj.style.top=tempy+e.clientY-offsety+"px"
return false
}
}

function initializedrag(e){
crossobj=ns6? document.getElementById("showimage") : document.all.showimage
var firedobj=ns6? e.target : event.srcElement
var topelement=ns6? "html" : document.compatMode && document.compatMode!="BackCompat"? "documentElement" : "body"
while (firedobj.tagName!=topelement.toUpperCase() && firedobj.id!="dragbar"){
firedobj=ns6? firedobj.parentNode : firedobj.parentElement
}

if (firedobj.id=="dragbar"){
offsetx=ie4? event.clientX : e.clientX
offsety=ie4? event.clientY : e.clientY

tempx=parseInt(crossobj.style.left)
tempy=parseInt(crossobj.style.top)

dragapproved=true
document.onmousemove=drag_drop
}
}
document.onmouseup=new Function("dragapproved=false")

////drag drop functions end here//////

function hidebox(){
crossobj=ns6? document.getElementById("showimage") : document.all.showimage
if (ie4||ns6)
crossobj.style.visibility="hidden"
else if (ns4)
document.showimage.visibility="hide"
}

function showbox(){
crossobj=ns6? document.getElementById("showimage") : document.all.showimage
if (ie4||ns6)
crossobj.style.visibility="visible"
else if (ns4)
document.showimage.visibility="show"
}

