function Netphiles_goToURL() {
  var i, args=Netphiles_goToURL.arguments;
  document.Netphiles_returnValue = false;
  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}

function Netphiles_openBrWindow(theURL,winName,features, myWidth, myHeight, isCenter){
  if(window.screen)if(isCenter)if(isCenter=="true"){
    var myLeft = (screen.width-myWidth)/2;
    var myTop = (screen.height-myHeight)/2;
    features+=(features!='')?',':'';
    features+=',left='+myLeft+',top='+myTop;
  }
  window.open(theURL,winName,features+((features!='')?',':'')+'width='+myWidth+',height='+myHeight);
}


function Netphiles_reloadPage(init) {
  if (init==true) with (navigator) {
  	if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
  		document.Netphiles_pgW=innerWidth;
  		document.Netphiles_pgH=innerHeight;
  		onresize=Netphiles_reloadPage;
  	}
  }
  else if (innerWidth!=document.Netphiles_pgW || innerHeight!=document.Netphiles_pgH) location.reload();
}
Netphiles_reloadPage(true);

function confirmDelete(){
	var agree=confirm("Are you sure you want to delete this?");
	if (agree)
		return true ;
	else
		return false ;
}

function Netphiles_swapImgRestore(){
    var i,x,a=document.Netphiles_sr;
    for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function Netphiles_preloadImages(){
    var d=document;
    if(d.images){
        if(!d.Netphiles_p) d.Netphiles_p=new Array();
        var i,j=d.Netphiles_p.length,a=Netphiles_preloadImages.arguments;
        for(i=0; i<a.length; i++)
            if (a[i].indexOf("#")!=0){
                d.Netphiles_p[j]=new Image;
                d.Netphiles_p[j++].src=a[i];
            }
    }
}

function Netphiles_findObj(n, d){
    var p,i,x;
    if(!d) d=document;
    if((p=n.indexOf("?"))>0&&parent.frames.length){
        d=parent.frames[n.substring(p+1)].document;
        n=n.substring(0,p);
    }
    if(!(x=d[n])&&d.all) x=d.all[n];
    for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
    for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=Netphiles_findObj(n,d.layers[i].document);
    if(!x && document.getElementById) x=document.getElementById(n);
    return x;
}

function Netphiles_swapImage(){
    var i,j=0,x,a=Netphiles_swapImage.arguments;
    document.Netphiles_sr=new Array;
    for(i=0;i<(a.length-2);i+=3)
    if((x=Netphiles_findObj(a[i]))!=null){
        document.Netphiles_sr[j++]=x;
        if(!x.oSrc) x.oSrc=x.src;
        x.src=a[i+2];
    }
}

function openImageWindow(theURL,winName,features, myWidth, myHeight, isCenter){
    if(window.screen)if(isCenter)if(isCenter=="true"){
        var myLeft = (screen.width-myWidth)/2;
        var myTop = (screen.height-myHeight)/2;
        features+=(features!='')?',':'';
        features+=',left='+myLeft+',top='+myTop;
    }
    window.open(theURL,winName,features+((features!='')?',':'')+'width='+myWidth+',height='+myHeight);
}

function P7_JumpMenu(selObj,restore){ //v1.4 by Project Seven
	var theFullString = selObj.options[selObj.selectedIndex].value;
	if (restore) selObj.selectedIndex=0;
	var theLength = theFullString.length;
	var endPos = theFullString.lastIndexOf("~");
	var theUrl, theTarget, theParent;
	if (endPos > 0) {theUrl = theFullString.substring(0,endPos);}
	else {theUrl = theFullString;}
	endPos++
	if (endPos < theLength) {theTarget = theFullString.substring(endPos,theLength)}
	else {theTarget = "window:Main";}
	if (theTarget == "window:New") {window.open(theUrl);}
	else if (theTarget == "window:Main") {eval("parent.location='"+theUrl+"'");}
	else {eval("parent.frames[\'"+theTarget+"\'].location='"+theUrl+"'");}
}

function P7_JumpMenuGo(selName,restore){ //v1.1 Beta Version by Project Seven
  var selObj = Netphiles_findObj(selName); if (selObj) P7_JumpMenu(selObj,restore);
}