function MSIE_VER() {
    agt=navigator.userAgent.toLowerCase();
    pos=agt.indexOf('msie')+1;
    if(pos)return agt.charAt(pos+4);
    return 0
}
function popup(url,title,attrib) 
{	
	wref=window.open(url,title,attrib);
}
function openWin(url,title,attrib) 
{	
	wref=window.open(url,title,attrib);
}

function openInnewWindow(url,width,height,toolbar)
{
	if(toolbar==1){
		openWin(url,'AfroSystems','toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes,width='+width+',height='+height)
		} 
	else {
	openWin(url,'AfroSystems','toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=yes,movable=yes,resizable=yes,width='+width+',height='+height)
	}
}


function viewImages(){
    scroll(0,0);
    document.getElementById("allImages").style.height = 500; //document.body.offsetHeight  - 30;
	document.getElementById("allImages").style.width = 950; //document.body.offsetWidth - 30;
	document.getElementById("allImages").style.top = 15;
	document.getElementById("allImages").style.left = 15;

    showHide("allImages"); 
}

function HideImages(){
    showHide("allImages");
}


function openArtistPhotoViewer(){
    b = "ShowArtist.aspx?artistcode=";
    x = location.href.indexOf(b);
    objectId = location.href.substring(x + b.length);
    ShowArtist.GetImages(objectId,callBack_ArtistGetPhotos);

}

function openStudyPlaceViewer(){
    b = "studyplacedetails.aspx?placecode=";
    x = location.href.indexOf(b);
    objectId = location.href.substring(x + b.length);
    StudyPlaceDetails.GetImages(objectId,callBack_GetPhotos);

}

function viewPhoto(imgUrl, imgTitle, imgDesc){
    document.getElementById("mainPhoto").src = imgUrl;
}

function parseUrl(imgUrl){
    imgUrl = imgUrl.replace(".jpg","_o.jpg")
    var t= "<a href=\"" + imgUrl + "\" target=\"_blank\" title=\"[+] Zoom Image\">[+]</a>";
    return t;
}

function showHide(element){
    document.getElementById(element).style.visibility = (document.getElementById(element).style.visibility == 'hidden')? 'visible':'hidden';
    document.getElementById(element).style.display = (document.getElementById(element).style.display == 'none')? 'block' : 'none';
}


