/*
var arrLeftImg=["images/d_ram_palpali/drp001.jpg", "images/y_c_bhurtel/ycb004.jpg", "images/d_ram_palpali/drp004.jpg"];
var arrRightImg=["images/b_r_shrestha/br001.jpg", "images/alok_gurung/ag001.jpg", "images/d_ram_palpali/drp008.jpg"];
var currIndex=-1;

var oInterval="";

oInterval=window.setInterval("changeImage()",5000);

function changeImage() {
	if (currIndex==2) 
		currIndex=-1;
		
	currIndex++;
	
	document.getElementById("imgl").src=arrLeftImg[currIndex];
	document.getElementById("imgr").src=arrRightImg[currIndex];	
}
*/

function getWindowSize() {
  var myWidth = 0, myHeight = 0;
  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
	myWidth = window.innerWidth;
    myHeight = window.innerHeight;
  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    //IE 6+ in 'standards compliant mode'
	myWidth = document.documentElement.clientWidth;
    myHeight = document.documentElement.clientHeight;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    //IE 4 compatible
	myWidth = document.body.clientWidth;
  	myHeight = document.body.clientHeight;
  }
  
  return { width : myWidth, height: myHeight};
}

function getScrollXY() {
  var scrOfX = 0, scrOfY = 0;
  if( typeof( window.pageYOffset ) == 'number' ) {
    //Netscape compliant
    scrOfY = window.pageYOffset;
    scrOfX = window.pageXOffset;
  } else if( document.body && ( document.body.scrollLeft || document.body.scrollTop ) ) {
    //DOM compliant
    scrOfY = document.body.scrollTop;
    scrOfX = document.body.scrollLeft;
  } else if( document.documentElement && ( document.documentElement.scrollLeft || document.documentElement.scrollTop ) ) {
    //IE6 standards compliant mode
    scrOfY = document.documentElement.scrollTop;
    scrOfX = document.documentElement.scrollLeft;
  }
  //return [ scrOfX, scrOfY ];
  return {scrollX: scrOfX, scrollY: scrOfY};
}

function getElementPosition(elem) {
	var posX = 0;  var posY = 0;
	
    while(elem!= null){
    	posX += elem.offsetLeft;
    	posY += elem.offsetTop;
        elem = elem.offsetParent;
    }
    
    return { x : posX, y : posY };
}

function showArtist() {
	var dvArtist=document.getElementById("artist");
	var pos=getElementPosition(window.event.srcElement);
	dvArtist.style.position="absolute";
	dvArtist.style.top=pos.y;
	dvArtist.style.left=pos.x+window.event.srcElement.offsetWidth;
	dvArtist.innerHTML="<span style='background-color: red'>Hello Artist</span>";
	dvArtist.className="artistVisible";
}

function hideArtist() {
	var dvArtist=document.getElementById("artist");
	dvArtist.innerHTML="";
	dvArtist.className="artistHidden";	
}

function createBox() {
	var dvArtist=document.getElementById("artist");
	dvArtist.style.width="230px";
	dvArtist.style.height="230px";
	dvAtrist.style.borderStyle="solid";
	
}