//*********************************************************************************************
//************************Popoup Window with image on Click event.
var newwindow = '';
var newOpenLinkWin='';

 function popitup(url,Wwi,Whe,Iwi,Ihe,Bwi,Bhe,BL,BT, sPhotoAuthor)  {
 if (newwindow.location && !newwindow.closed) {
   // alert("White!");
   // newwindow.location.href = url; 
   // newwindow.focus(); 
    } 
 else { 
     
    newwindow=window.open('','PopupWindoow', 'width='+Wwi+',height='+Whe+',resizable=0');
    newwindow.document.write("<HTML>");
    newwindow.document.write("<HEAD>");
    newwindow.document.write("</HEAD>");
    newwindow.document.write("<body bgColor='#000000'>");
   
    //Image
    newwindow.document.write("<IMG id='Img0' name='Img0' ");
    newwindow.document.write(" style=\" LEFT: 25px;  TOP: 16px; POSITION: absolute; ");
    newwindow.document.write(" WIDTH: " + Iwi+ "px; ");
    newwindow.document.write(" HEIGHT: " + Ihe+ "px\"");
    newwindow.document.write(  " width='" + Iwi + "'");
    newwindow.document.write(" height='" + Ihe + "'");
    newwindow.document.write(" > ");
     
    //Button 'Close'    
    newwindow.document.write("<INPUT id='Btn1' name='Btn1' type='button' value='Close' "); 
    newwindow.document.write(" style=\"Z-INDEX: 102; POSITION: absolute; ");
    newwindow.document.write(" LEFT: " + BL+ "px; ");
    newwindow.document.write(" TOP: " + BT+ "px;  ");
    newwindow.document.write(" WIDTH: "+ Bwi+ "px; " );
    newwindow.document.write(" HEIGHT: "+ Bhe+ "px\"");
    newwindow.document.write(" onClick='top.window.close()' >");
    
    newwindow.document.write("<DIV  ");
    newwindow.document.write(" style=\"WIDTH: 392px; HEIGHT: 24px; ");
    newwindow.document.write(" POSITION: absolute; ");
    newwindow.document.write(" LEFT: 26px; ");
    newwindow.document.write(" TOP: " + (Ihe + 30) + "px; ");
    newwindow.document.write(" font: 10px Arial; FONT-WEIGHT: normal; COLOR:#A9A9AB;\" ");
    newwindow.document.write(">Photo by " + sPhotoAuthor+ "</DIV>");
    
//(Ihe + 30)
    
    
    //newwindow.document.write("<INPUT  type='button' value='Close' ID='Button1' NAME='Button1'>")
   // newwindow.document.bgColor ="#000000";
    //newwindow.location.href = url; 
    
   newwindow.document.write("</body>"); 
   newwindow.document.write("</HTML>");
  
   newwindow.document.Img0.width=Iwi;
   newwindow.document.Img0.height=Ihe;
   newwindow.document.Img0.src =url;
     
  } 
 }


 function tidy() {
 if (newwindow.location && !newwindow.closed) { 
   newwindow.close(); } 
 }

//*********************End Popoup Window logic***************************************************
function OpenLink(url)
{

window.open(url,'newOpenLinkWin','toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,copyhistory=yes,resizable=yes' ) 
}


//***********************************************************************************************
function doSomething(e)
	{
	if (!e) var e = window.event;
	//alert(e.type);
	return e.type
	}

function over_effect(e,state){
	if (document.all)
	source4=event.srcElement
	else if (document.getElementById)
	source4=e.target
		while(source4.tagName!="TD")
		{
			source4=document.getElementById? source4.parentNode : source4.parentElement
			if (doSomething(event)=='mouseout')
			{  source4.className="redItemtext";}
			
			if (doSomething(event)=='mouseover')
			{  source4.className="blueItemtext";}
	    }
	}
	
function over_effectV(e,state){
	if (document.all)
	source4=event.srcElement
	else if (document.getElementById)
	source4=e.target
	
	                      
		while(source4.tagName!="TABLE")
		{
			//source4=document.getElementById? source4.parentNode : source4.parentElement
			if (doSomething(event)=='mouseout')
			{  source4.className="redItemtext"; break;}
			
			if (doSomething(event)=='mouseover')
			{  source4.className="blueItemtext"; break;}
	    }
	  
	}	
	
function over_effect_sub(e,state){
		if (document.all)
	source4=event.srcElement
	else if (document.getElementById)
	source4=e.target
		while(source4.tagName!="TD")
		{
			source4=document.getElementById? source4.parentNode : source4.parentElement
			if (doSomething(event)=='mouseout')
			{  source4.className="blueSubItem";}
			
			if (doSomething(event)=='mouseover')
			{  source4.className="redSubItem";}
			
	    }
	}	
	
function roll_over(img_name, img_src)
   {
   document[img_name].src = img_src;
   }
		
	
function ChgPage(e)
	{
	if (document.all)
	source4=event.srcElement
	else if (document.getElementById)
	source4=e.target
	//alert("click!"); 
		while(source4.tagName!="TD")
		{
			source4=document.getElementById? source4.parentNode : source4.parentElement
			if (doSomething(event)=='click')
			{ 
				if (source4.id=="next")
				{
				 //alert("next");
				}
			 
				if (source4.id=="prev")
				{
				 //alert("prev");
				} 
			}
		}
	}
	
	
function NavButtonOver(e)
	{
	if (document.all)
	source4=event.srcElement
	else if (document.getElementById)
	source4=e.target
	//alert("click!"); 
	 
		while(source4.tagName=="IMG")
		{
		  //alert(source4.name); 
		  if (source4.id=="inext" && doSomething(event)=='mouseover')
		  {
		   roll_over("inext", "../Images/next_r.gif");
		  }
		  
		  if (source4.id=="inext" && doSomething(event)=='mouseout')
		  {
		   roll_over("inext", "../Images/next.gif");
		  }
		  
		  if (source4.id=="iprev" && doSomething(event)=='mouseover')
		  {
		   roll_over("iprev", "../Images/previous_r.gif");
		  }
		  
		  if (source4.id=="iprev" && doSomething(event)=='mouseout')
		  {
		   roll_over("iprev", "../Images/previous.gif");
		  }
		  		  
		  break;
		}
	}
	
	


	//3-state Highlight menu effect script: By Dynamicdrive.com
	//For full source, Terms of service, and 100s DTHML scripts
	//Visit http://www.dynamicdrive.com

function over_effectVertical(e,clr){
	if (document.all)
	source4=event.srcElement
	else if (document.getElementById)
	source4=e.target
	
	if (source4.tagName=="TD")
		{	
			if     (( doSomething(event)=='mouseover') &&  (source4.className="SideMenuBlue")) 
		    
				{source4.className="SideMenuRed"}
			else if (( doSomething(event)=='mouseover') &&  (source4.className="SideMenuRed")) 
				{source4.className="SideMenuRed"}
		          
			else if (( doSomething(event)=='mouseout') &&  (source4.className="SideMenuBlue")) 
				{source4.className="SideMenuBlue"}
		         
		    else if (( doSomething(event)=='mouseout') &&  (source4.className="SideMenuRed")) 
				{source4.className="SideMenuBlue"}
        }       
	else{
	  while(source4.tagName!="TABLE")
	  {
	        source4=document.getElementById? source4.parentNode : source4.parentElement
	       
	         if  ( doSomething(event)=='mouseover') {source4.className="SideMenuRed"}     
	         else if ( doSomething(event)=='mouseout')    {source4.className="SideMenuBlue"} 
	         
	   } //while
	}
	
}

function over_Picture(e) {
if (document.all)
	source4=event.srcElement
	else if (document.getElementById)
	source4=e.target
	
if (source4.tagName=="IMG") {

	if (source4.id=="imgDancer") {
	if ( doSomething(event)=='mouseover') {
	 		source4.src = "../Images/B_KatyaIsBellydancer.jpg"
			}
				       
		else if ( doSomething(event)=='mouseout') {
			source4.src = "../Images/W_KatyaIsBellydancer.jpg"
	}  //event
				   
	} //img id
}  //img tag
	
} //function

	




