var inith = 0;

var cpath = "default";
var photoboxpath = "default";

var location_top = '0';
var location_left = '0';

var brwin = navigator.appName;
var brver =  navigator.appVersion;
brver = brver.substring(0,1);

function getpath(hsid){
	var thsid = "h" + hsid;
	if (document.layers){
		cpath = eval('document.' + thsid);
	}else if (document.all){
		cpath = eval('document.all.' + thsid + '.style');
	}else if (document.getElementById){
		cpath = eval('document.getElementById("' + thsid + '").style');		
	}
}

function getphotoboxpath(){
	var id = "photobox";
	if (document.layers){
		photoboxpath = eval('document.' + id);
	}else if (document.all){
		photoboxpath = eval('document.all.' + id + '.style');
	}else if (document.getElementById){
		photoboxpath = eval('document.getElementById("' + id + '").style');		
	}
	location_top = photoboxpath.top;
	location_left = photoboxpath.left;
}

function placehomedetails( top, left ) {
	cpath.top = top;
	cpath.left = left;
}

function show_photo(){
	// refresh the image
	getphotoboxpath();
	placehomedetails( location_top, location_left );
	cpath.visibility = 'visible';
}

function hide_photo(){
	// hide the image
	cpath.visibility = 'hidden';
}

function showhide(hid){
	if (inith == 0){
		inith = 1;	
	}else{	
		hide_photo();
	}	
	
	getpath(hid);
	show_photo();
}
