function setPrefixes(newprefix, visprefix, activepefix, enlargeprefix)
{
	newpref = newprefix;
	vispref = visprefix; 
	actpref = activepefix;
	enlpref = enlargeprefix;
}


function BgLoadingLow()
{ 
	if (counter >= 0 && counter < nHotSpots)
	{
		while (counter < nHotSpots )
			counter++;
		HotSpot[counter].Loaded = 1;
	}
	counter++;
	while (counter < nHotSpots  && HotSpot[counter].Loaded) // it may be already loaded, skip until unloaded is found or reach the limit
		counter++;
	var el = document.getElementById(virtualPhotoId);
	if (counter < nHotSpots ){
		cnt='<img  id="VirtualPhotograph" src="'+HotSpot[counter].ImgSrc+'" onload="BgLoadingHi();"  onerror="BgLoadingHi();">';
		el.innerHTML = cnt;
	}
}
function BgLoadingHi()
{ 
	cnt='<img  id="VirtualPhotograph" src="'+HotSpot[counter].OrigSrc+'" onload="BgLoadingLow();"  onerror="BgLoadingLow();"/>';
	document.getElementById(virtualPhotoId).innerHTML = cnt;
	
}


function LoadActivePhotoLow(id)
{
	cnt='<img id="'+id+'" src="'+HotSpot[ActiveHotSpot].ImgSrc+'" onload="BgLoadingLow();"  onerror="BgLoadingLow();"/>';
	document.getElementById(virtualPhotoId).innerHTML = cnt;
	document.getElementById("Photocell").innerHTML = cnt;
}
 
function LoadActivePhotoHi(id)
{
	cnt='<img id="'+id+'" src="'+HotSpot[ActiveHotSpot].OrigSrc+'" onload="BgLoadingLow();"  onerror="BgLoadingLow();"/>';
	document.getElementById(virtualPhotoId).innerHTML = cnt;
	document.getElementById("Photocell").innerHTML = cnt;
}
<!-- 
 --><!-- 
 -->
