//To open a window inside the main window with size and location
/*var popUp;	
function OpenWin(URL) {
			
	//if pop is opened, close it before running open method in order to re-assign properties
	if(popUp!=null && !popUp.closed){  
		popUp.close();
	}
	
	popUp=window.open(URL, "Tour", "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width=900,height=600,left=30, top=10");
	
	if (navigator.appName == "Netscape"){ 
		popUp.window.focus();
	}
	else{
		popUp.focus();
			
	}
			
}*/

//these fuctions are in use
var winOpener;
function WinOpen(){

	if(winOpener!=null && !winOpener.closed){  
		winOpener.close();
	}
	
	var imgID = GetImgID();
	var URL = "tour.aspx?img=" + imgID;
	winOpener=window.open(URL, "Tour", "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width=985,height=660,left=30, top=10");
	
	if (navigator.appName == "Netscape"){ 
		winOpener.window.focus();
	}
	else{
		winOpener.focus();
			
	}
}

function IDChange(strID)
{
	document.space.id = strID;
}

function GetImgID(){
	return document.space.id;
}

function DescChange(strDesc)
{
	document.description.value=strDesc;
}

function ImgChange( strSrc, strWidth, strHeight ) {
   var ret = false;
   if ( document.space ) {
      if ( document.space.src ) {
         document.space.src = strSrc;
         document.space.width = strWidth;
         document.space.height = strHeight;
         ret = true;
      }
   }
   return ret;
}


function ChangeImg( strSrc, strWidth, strHeight, strID ) {
   var ret = false;
   if ( document.space ) {
      if ( document.space.src ) {
         document.space.src = strSrc;
         document.space.width = strWidth;
         document.space.height = strHeight;
         document.space.id = strID;
         ret = true;
      }
   }
   return ret;
}