

/*========================================================================
copyright www.gigurtsis.com - 2009
=========================================================================== */


function whichBrs() {
var agt=navigator.userAgent.toLowerCase();
if (agt.indexOf("opera") != -1) return 'Opera';
if (agt.indexOf("staroffice") != -1) return 'Star Office';
if (agt.indexOf("webtv") != -1) return 'WebTV';
if (agt.indexOf("beonex") != -1) return 'Beonex';
if (agt.indexOf("chimera") != -1) return 'Chimera';
if (agt.indexOf("netpositive") != -1) return 'NetPositive';
if (agt.indexOf("phoenix") != -1) return 'Phoenix';
if (agt.indexOf("firefox") != -1) return 'Firefox';
if (agt.indexOf("safari") != -1) return 'Safari';
if (agt.indexOf("skipstone") != -1) return 'SkipStone';
if (agt.indexOf("msie") != -1) return 'Internet Explorer';
if (agt.indexOf("netscape") != -1) return 'Netscape';
if (agt.indexOf("mozilla/5.0") != -1) return 'Mozilla';
if (agt.indexOf('\/') != -1) {
if (agt.substr(0,agt.indexOf('\/')) != 'mozilla') {
return navigator.userAgent.substr(0,agt.indexOf('\/'));}
else return 'Netscape';} else if (agt.indexOf(' ') != -1)
return navigator.userAgent.substr(0,agt.indexOf(' '));
else return navigator.userAgent;
}

/*========================================================================
code to replace pictures and text in gallery

=========================================================================== */
function setGalleryTitle()
    {
	 var aTitle;
	 aTitle = findObject("galleryTitle",0);
	 aTitle.innerHTML ='Gallery of '+tableData[0][4];
	 };
	 
		
function buildObjectArray() 
    {
	 	var i;
		var aPicture;
		var aDescription;
	 	for (i = 0; i <numberOfItems; i++)
	 	 	{
	      	aPicture = findObject("pic"+i,0);
			aPicture.src = tableData[i][1];
			aDescription = findObject("desc"+i,0);
			
			if(tableData[i][4] == 1)
			 	{
					aPicture.innerHTML =  "<a href=\"../Gallery/"+tableData[i][3]+".htm\" onclick=\"javascript\:pageTracker\.\_trackPageview(' "+tableData[i][2]+ "')\;\" target=\"_parent\" > <img src= " + tableData[i][1]+" style= \"border:\#ffffff 3px solid\"  alt=\" " + tableData[i][2]+"\" title=\" "+tableData[i][2]+"\" width=\"149\" height=\"99\" border=\"0\" /> <\/a>";
					//alert(aPicture.innerHTML);
					aDescription.innerHTML =  "<a class=\"buttons\" href=\"../Gallery/"+tableData[i][3]+".htm\" onclick=\"javascript\:pageTracker\.\_trackPageview(' "+tableData[i][2]+ "')\;\" target=\"_parent\" >  "+tableData[i][2]+"<\/a>";
					//{temp.innerHTML =  "<a id=\"wlink\" href=\"http:\/\/" + tableData[index][15] +"\" target=\"\_blank\"> Link to "+tableData[index][15]+"<\/a>";
					//temp1.href = "http://"+ tableData[index][15];
					//alert(aDescription.innerHTML);
			 	}
			 else
			    {
				    aPicture.innerHTML =  " <img src= " + tableData[i][1]+" style= \"border:\#999999 3px solid\"  alt=\" " + tableData[i][2]+"\" title=\" "+tableData[i][2]+"\" width=\"149\" height=\"99\" border=\"0\" /> ";
					aDescription.innerHTML =  tableData[i][2];
				 };
	     	};
	 };
function buildGalleryObjectArray() 
    {
	 	var i;
		var aPicture;
		var aDescription;
		var aTable;
		var aMedia;
	 	for (i = 0; i <numberOfItems; i++)
	 	 	{
			  aPicture = findObject("pic"+i,0);
			  aTempPic = "\"../images/members/"+tableData[i][5]+"/Views/"+tableData[i][1]+"\"";
			if(tableData[i][6] == 1)
	      	  {aPicture.innerHTML =  "<a href=\"#\"><img src= " + aTempPic+"  alt=\" " + tableData[i][2]+"\" title=\" "+tableData[i][2]+"\" width=\"149\" height=\"99\" style= \"border:\#ffffff 4px solid\"  onclick=\"openMagnifiedView('"+tableData[i][5]+"','" +tableData[i][1]+"')\; return false\"/> <\/a>"; }			
			else
	      	  {aPicture.innerHTML =  "<img src= " + aTempPic+"  alt=\" " + tableData[i][2]+"\" title=\" "+tableData[i][2]+"\" width=\"149\" height=\"99\" style= \"border:\#000000 2px solid\"  /> <\/a>"; }			

//				alert(aPicture.innerHTML);
				aDescription = findObject("desc"+i,0);
				aDescription.innerHTML =  tableData[i][2];
				aMedia = findObject("picMedia"+i,0);
				aMedia.innerHTML =  tableData[i][3];	   
	     	};
	 };
 
 
 function buildGalleryPriceObjectArray() 
    {
	 	var i;
		var aPicture;
		var aDescription;
		var aTable;
		var aMedia;
		var aSize;
	 	for (i = 0; i <numberOfItems; i++)
	 	 	{
			  aPicture = findObject("pic"+i,0);
			  aTempPic = "\"../images/members/"+tableData[i][5]+"/Views/"+tableData[i][1]+"\"";
			if(tableData[i][6] == 1)
	      	  {aPicture.innerHTML =  "<a href=\"#\"><img src= " + aTempPic+"  alt=\" " + tableData[i][2]+"\" title=\" "+tableData[i][2]+"\" width=\"149\" height=\"99\" style= \"border:\#ffffff 4px solid\"  onclick=\"openMagnifiedView('"+tableData[i][5]+"','" +tableData[i][1]+"')\; return false\"/> <\/a>"; }			
			else
	      	  {aPicture.innerHTML =  "<img src= " + aTempPic+"  alt=\" " + tableData[i][2]+"\" title=\" "+tableData[i][2]+"\" width=\"149\" height=\"99\" style= \"border:\#000000 2px solid\"  /> <\/a>"; }			

//				alert(aPicture.innerHTML);
				aDescription = findObject("desc"+i,0);
				aDescription.innerHTML =  tableData[i][2];
				aMedia = findObject("picMedia"+i,0);
				aMedia.innerHTML =  tableData[i][3];
				aSize = findObject("picSize"+i,0);
				aSize.innerHTML =  tableData[i][7];	 	   
	     	};
	 };
 
/*========================================================================
findObject 			find an object reference wither withStyle (1) or without (0)
isBrowserNetscape 	test to see if the browser is Netscape

=========================================================================== */

function findObject(objectID,withStyle) {


var isDHTML = 0;
var isID = 0;
var isAll = 0;
var isLayers = 0;

if (document.getElementById) 
          {isID = 1; isDHTML = 1;}
     else {if (document.all) {isAll = 1; isDHTML = 1;}
             else {browserVersion = parseInt(navigator.appVersion);
                   if((navigator.appName.indexOf('Netscape') != -1) && (browserVersion == 4)) 
                        {isLayers = 1; isDHTML = 1;}
                  }
          };

 if (withStyle == 1) 
	{if (isID) { return(document.getElementById(objectID).style) ; }		
            else { if (isAll) { return (document.all[objectID].style); }	
                       else {if (isLayers) { return (document.layers[objectID]); }};
                 }
        }
	
    else {if (isID) { return (document.getElementById(objectID)) ; }		
             else {if (isAll) { return (document.all[objectID]); }		
                       else {if (isLayers) { return (document.layers[objectID]); }};
          }
     }
};

function isBrowserNetscape() 
	{
	 var nav = navigator.appName.indexOf("Netscape");
	 return nav;
	};

 