
/*******************************************************************************
Copyright (c) 1999 Thomas Brattli (www.bratta.com)

eXperience DHTML coolMenus - Get it at www.bratta.com
Version 1.0
This script can be used freely as long as all copyright messages are
intact. Visit www.bratta.com/dhtml for the latest version of the script.

This is the actual script page. You shouldn't really have to edit anything in
here.
*******************************************************************************/


//Ie var
var explorerev=''

var lvl=''
var offline= 'file:///C:/photo/';

//var offline= 'file:///G:/aminghui_0306/photo/';
//var online_main= 'http://209.196.48.36/photo/';
var online_test= 'https://209.31.26.170:44320/';
var online_new1 = 'http://64.7.29.169/';
var online_new2 = 'http://209.31.26.179/';
var online_new3 = 'http://64.139.42.41/';
var online_main= 'http://photo.minghui.ca/';
var online_main3='https://64.7.29.169:8080/cphotoadmin/';
var online_main4='https://64.62.143.6/photoadmin/cphotoadmin/';
var online_main5='https://64.62.143.6:8080/cphotoadmin/';

var online_local = 'http://localhost/photo/';

var cnt=0;


var off_cnt=0;

function getLevel(){
	var cnt=0;
	var addr='';
	var tmp= location.href;
	
	
	
	if(tmp.indexOf('file:')>-1 || tmp.charAt(1)==':') 
		addr= offline;
	else if(tmp.indexOf('209.31.26.170')>-1) 
		addr= online_test;
	else if(tmp.indexOf('64.7.29.169:8080')>-1) 
		addr= online_main3;		
	else if(tmp.indexOf('64.7.29.169')>-1) 
		addr= online_new1;
	else if(tmp.indexOf('209.31.26.179')>-1) 
		addr= online_new2;
	else if(tmp.indexOf('64.139.42.41')>-1) 
		addr= online_new3;
	else if(tmp.indexOf('http://localhost/photo')>-1) 
		addr= online_local;	
	else if(tmp.indexOf('http://localhost/cphotoadmin')>-1) 
		addr= online_local;	
	else if(tmp.indexOf('64.62.143.6/photoadmin/cphotoadmin')>-1) 
		addr= online_main4;
	else if(tmp.indexOf('64.62.143.6:8080/cphotoadmin')>-1) 
		addr= online_main5;				
	else if(tmp.indexOf('http:')>-1)
		addr= online_main;
		
	for(var i=0;i<addr.length;i++){
		if(addr.charAt(i)=='\/'){
			off_cnt+=1
		}
	}
	for(var i=0;i<tmp.length;i++){
		if(tmp.charAt(i)=='\/'){
			cnt+=1;
			if(cnt>off_cnt)lvl+='../'
		}
	}
}
getLevel();


function URL_HIGH(file)
{
	URLAddress = "../../allimages/"

	link = "index_files/Button_Higt.jpg"
	if(link)
	{
		link=(link=='#' || (link.indexOf(':')>-1))?link:lvl+link;
		//str+='<a href="'+link+'"';
	}		
	document.write("<a href='"+URLAddress+file+"'><img  border=0 src='"+link+"'></a>")
}
	
function URL_C(desc,file)
{
	
	link = "index_files/Button_Higt.jpg"
	if(link)
	{
		link=(link=='#' || (link.indexOf(':')>-1))?link:lvl+link;
		//str+='<a href="'+link+'"';
	}		
	
	URLAddress = "../../allimages/"
	document.write("<a href='"+URLAddress+file+"'><img border=0 src='"+link+"' alt='"+desc+"'></a>")
}




/*********************************************************************************************
END Menu script
*********************************************************************************************/
