

userAgent = window.navigator.userAgent;
browserVers = parseInt(userAgent.charAt(userAgent.indexOf("/")+1),10);
function findElement(n,ly) {
	if (browserVers < 4)		return document[n];
	var curDoc = ly ? ly.document : document;
	var elem = curDoc[n];
	if (!elem) {
		for (var i=0;i<curDoc.layers.length;i++) {
			elem = findElement(n,curDoc.layers[i]);
			if (elem) return elem;
		}
	}
	return elem;
}

function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}

function changeImages() {
	if (document.images) {
		var img;
		for (var i=0; i<changeImages.arguments.length; i+=2) {
			img = null;
			if (document.layers) {
				img = findElement(changeImages.arguments[i],0);
			}
			else {
				img = document.images[changeImages.arguments[i]];
			}
			if (img) {
				img.src = changeImages.arguments[i+1];
			}
		}
	}
}


function openpopWindow(theURL,winName,features){//v2.0
window.open(theURL,winName,features)

}
var preloadFlag = false;
function preloadImages(){ 
window.focus()
						 
	if (document.images) {
		image1_over = newImage("images/guide_off.jpg");
		image2_over= newImage("images/marda_off.jpg");
		image3_over= newImage("images/par_off.jpg");
		image4_over= newImage("images/bk.jpg");
		image5_over= newImage("images/grid.gif");
		image6_over= newImage("images/rebecca_off.jpg");
		preloadFlag = true;
	}
}

//change link descriptions to your own. Extend as needed
var linktext=new Array()
linktext[0]="Parque Lezama: A neighborhood plaza in Buenos Aires, Argentina systematically photographed over two months to understand patterns of community making."
linktext[1]="<b>Kaushik Panchal\'s Portfolio</b><br>A portfolio of work in interactive media.</br>"
linktext[2]="<b>Toynbee Hall Portraits</b> <br> is an exploration of community through portraits at the Toynbee Hall Senior Care Centre, East London.</br>"
linktext[3]="<b>Playground</b><br>Where would you take me on a guided tour ? <br>The guided tour project was presented at the De la Vega outdoor art show in New York in the summer of 2002.</br>"
linktext[4]="<b>Marda</b><br>My friend Marda Stark showed me her family photographs and let me photograph her.Ê What happens when the story behind the photograph is more important than the actual image?</br>"
linktext[5]="A collaborative project between a photographer and a designer,buscada.com represents our ongoing efforts to use the medium of the web tofind new ways to build contextualframeworks for our design, photography, and narrative projects. Designer, Kaushik Panchal. Photographer, Gabrielle Bendiner-Viani."
linktext[6]="<b>Lost and Found</b><br>Photographs found on the streets of several cities since 1993.  Their characters are unknown, but the locations in which they were found trace Gabrielle's own walks through these several cities.<br>[Updated weekly]</br>"
linktext[7]="<b>Parque Lezama</b><br>A neighborhood plaza in Buenos Aires, Argentina systematically photographed over two months to understand patterns of community making.</br>"
linktext[8]="<b>Work in Progress</b><br>Descriptions of the projects on which we are currently working, and previews of those projects that will soon appear on this site.</br>"
linktext[9]="<b>Gabrielle\'s Resume</b><br>Gabrielle Bendiner-Viani's resume of photography and teaching experience.</br>"
var ns6=document.getElementById&&!document.all
var ie=document.all

function show_text(thetext, whichdiv){
if (ie) eval("document.all."+whichdiv).innerHTML=linktext[thetext]
else if (ns6) document.getElementById(whichdiv).innerHTML=linktext[thetext]
}

function reset(whichdiv){
if (ie) eval("document.all."+whichdiv).innerHTML=' '
else if (ns6) document.getElementById(whichdiv).innerHTML=' '
}

ns4 = (document.layers)? true:false
ie4 = (document.all)? true:false

// Show/Hide functions for non-pointer layer/objects
function show(id) {
	if (ns4) document.layers[id].visibility = "show"
	else if (ie4) document.all[id].style.visibility = "visible"
}

ns4 = (document.layers)? true:false
ie4 = (document.all)? true:false

function hide(id) {
	if (ns4) document.layers[id].visibility = "hide"
	else if (ie4) document.all[id].style.visibility = "hidden"
}

ns4 = (document.layers)? true:false
ie4 = (document.all)? true:false

function show_lyr(lyr) {
	var theLyr = (document.layers)? getLyrRef(lyr,document) : (document.all)? document.all[lyr].style : (document.getElementById)? document.getElementById(lyr).style: null;
	if (!theLyr) return;
	theLyr.zIndex=100;
	theLyr.visibility = "visible";
}

function hide_lyr(lyr) {
	var theLyr = (document.layers)? getLyrRef(lyr,document) : (document.all)? document.all[lyr].style : (document.getElementById)? document.getElementById(lyr).style: null;
	if (!theLyr) return;
	theLyr.zIndex=1;
	theLyr.visibility = "hidden";	
}


function shownew(object) {
    if (document.getElementById && document.getElementById(object) != null)
         node = document.getElementById(object).style.visibility='visible';
    else if (document.layers && document.layers[object] != null)
        document.layers[object].visibility = 'visible';
    else if (document.all)
        document.all[object].style.visibility = 'visible';
}

function hidenew(object) {
    if (document.getElementById && document.getElementById(object) != null)
         node = document.getElementById(object).style.visibility='hidden';
    else if (document.layers && document.layers[object] != null)
        document.layers[object].visibility = 'hidden';
    else if (document.all)
         document.all[object].style.visibility = 'hidden';
}

      if (document.images) {
            img01on = new Image();          
            img01on.src = "images/button_1_on.gif";   
            img02on = new Image();          
            img02on.src = "images/button_2_on.gif";     		
            img03on = new Image();          
            img03on.src = "images/button_3_on.gif";    
            img04on = new Image();          
            img04on.src = "images/support_on.gif";    
            img05on = new Image();          
            img05on.src = "images/contact_us_on.gif";// Active Images (rollover)
			  
			  img01off = new Image();          
            img01off.src = "images/button_1_off.gif";   
            img02off = new Image();          
            img02off.src = "images/button_2_on.gif";     		
            img03off = new Image();          
            img03off.src = "images/button_3_on.gif";    
            img04off = new Image();          
            img04off.src = "images/support.gif";    
            img05off = new Image();          
            img05off.src = "images/contact_us.gif";// INactive Images
			  
			  img01ad = new Image();         
            img01ad.src = "images/image_1.gif";      
            img02ad = new Image();         
            img02ad.src = "images/messprod.gif";
            img03ad = new Image();         
            img03ad.src = "images/messerv.gif";       
            img04ad = new Image();         
            img04ad.src = "images/messupp.gif";      
            img05ad = new Image();         
            img05ad.src = "images/messcont.gif";// Secondary popup Images
        }
// Function to 'activate' images.
function imgOn(imgName) {
        if (document.images) {
            document[imgName].src = eval(imgName + "on.src");
            document["photo"].src = eval(imgName + "ad.src");
        }
}
// Function to 'deactivate' images.
function imgOff(imgName) {
        if (document.images) {
            document[imgName].src = eval(imgName + "off.src");
            document["photo"].src = "images/photo1.gif"; // Initially loaded Secondary popup Image
        }
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}