// setup test for Nav 4.0
var isIE = false;
var isNav = (navigator.appName.indexOf("Netscape")>=0);
var isNav4 = false;
var isIE4 = false;
var is5up = false;
//alert(navigator.appVersion);
if (isNav) {

	if (parseFloat(navigator.appVersion)<5) {
		isNav4=true;
		//alert("Netscape 4.x or older");
	} else {
		is5up = true;
	}
} else {
	isIE4=true;
	isIE=true;
	if (navigator.appVersion.indexOf("MSIE 5")>0) {
		isIE4 = false;
		is5up = true;
		//alert("IE5");
	}
}
function openUploadWin(filepath) {
    if (top.window.Upload && top.window.Upload.closed == false) {
        top.window.Upload.focus();
        top.window.Upload.document.location = filepath;
    } else if (window.Upload && window.Upload.closed == false) {
        window.Upload.focus();
        window.Upload.document.location = filepath;
    } else {
        doPopup('1024','768',filepath,'Upload', true, true);
    }
}
function openLayerWin(filepath) {
    if (top.window.Modify_Layer && top.window.Modify_Layer.closed == false) {
        top.window.Modify_Layer.focus();
        top.window.Modify_Layer.document.location = filepath;
    } else if (window.Modify_Layer && window.Modify_Layer.closed == false) {
        window.Modify_Layer.focus();
        window.Modify_Layer.document.location = filepath;
    } else {
        doPopup('1024','768',filepath,'Modify_Layer', true, true);
    }
}
function openServiceWin(filepath) {
    if (top.window.Build_Service && top.window.Build_Service.closed == false) {
        top.window.Build_Service.focus();
        top.window.Build_Service.document.location = filepath;
    } else if (window.Build_Service && window.Build_Service.closed == false) {
        window.Build_Service.focus();
        window.Build_Service.document.location = filepath;
    } else {
        doPopup('1024','768',filepath,'Build_Service', true, true);
    }
}
function openEditWindow(filepath) {
    if (top.window.Content_Edit && top.window.Content_Edit.closed == false) {
        top.window.Content_Edit.focus;
        top.window.Content_Edit.document.location = filepath;
    } else if (window.Content_Edit && window.Content_Edit.closed == false) {
        window.Content_Edit.focus;
        window.Content_Edit.document.location = filepath;
    } else {
        doPopup('1024','768',filepath,'Content_Edit',true, true);
   }
}

function openLibraryUploadIconWin(filepath) {
    if (top.window.LibraryUploadIcon && top.window.LibraryUploadIcon.closed == false) {
        top.window.LibraryUploadIcon.focus();
        top.window.LibraryUploadIcon.document.location = filepath;
    } else if (window.LibraryUploadIcon && window.LibraryUploadIcon.closed == false) {
        window.LibraryUploadIcon.focus();
        window.LibraryUploadIcon.document.location = filepath;
    } else {
        doPopup('650','450',filepath,'LibraryUploadIcon', true, true);
    }
}

function openLibraryInfoWin(filepath) {
    if (top.window.LibraryInfo && top.window.LibraryInfo.closed == false) {
        top.window.LibraryInfo.focus();
        top.window.LibraryInfo.document.location = filepath;
    } else if (window.LibraryInfo && window.LibraryInfo.closed == false) {
        window.LibraryInfo.focus();
        window.LibraryInfo.document.location = filepath;
    } else {
        doPopup('930','750',filepath,'LibraryInfo', true, true);
    }
}

function openCommonSmallWin(filepath) {
    if (top.window.CommonSmallWin && top.window.CommonSmallWin.closed == false) {
        top.window.CommonSmallWin.focus();
        top.window.CommonSmallWin.document.location = filepath;
    } else if (window.CommonSmallWin && window.CommonSmallWin.closed == false) {
        window.CommonSmallWin.focus();
        window.CommonSmallWin.document.location = filepath;
    } else {
        doPopup('650','500',filepath,'CommonSmallWin', true, true);
    }
}