//_______________________________MarQi_H0h7$+3iz____________________________________________________________

function roll(img_name, img_src)
   {
   document[img_name].src = img_src;
   }
     

function PageSw(current, next){		//______________________________switch_between_the_CSS_layers_on_a_page.
		
	currtit = 		"title"+current;									//Build_ID_NAMES_from_ARG's
	nexttit = 		"title"+next;
	currbuttons = 	"buttons"+current;
	nextbuttons = 	"buttons"+next;
	currnav = 		"nav"+current;
	nextnav=		"nav"+next;
	currtext = 		"text"+current;
	nexttext = 		"text"+next;
	currimage = 	"image"+current;
	nextimage = 	"image"+next;
	currlinx =		"nav"+current+"linx";
	nextlinx =		"nav"+next+"linx";

	document.getElementById(currtit).style.display = "none";			//____TITLES
	document.getElementById(nexttit).style.display = "block";
	
	document.getElementById(currbuttons).style.display = "none";		//____BUTTONS
	document.getElementById(nextbuttons).style.display = "block";
	
	if(next=="draw"){document.getElementById("drawtoggles").style.display = "block";}				//____EXPAND_Drawing_subNAVIGATION
	
	if((next!=="draw")&&(next!=="nyc")&&(next!=="monster")&&(next!=="nine")&&(next!=="thirteen") 	//____COLLAPSE_Drawing_subNAVIGATION_____
	  &&(next!=="journal")&&(next!=="lion")&&(next!=="boy")&&(next!=="girl")&&(next!=="donut"))
			{document.getElementById("drawtoggles").style.display = "none";
			 document.getElementById(currnav).style.color = "#ff0099";
			 document.getElementById("navdraw").style.color = "#ff0099";
			 document.getElementById("navdrawlinx").style.color = "#ff0099";}
								
	if (current !== "draw") {											//____leave_DRAWING_DOT_ON_____
		document.getElementById(currnav).style.color = "#ff0099";}		//____NAVIGATION_color_DOT
	document.getElementById(nextnav).style.color = "white";
	
	if (current !== "draw") {											//____leave_DRAWING_Text_ON_____
		document.getElementById(currlinx).style.color = "#ff0099";}		//____NAVIGATION_Text
	document.getElementById(nextlinx).style.color = "white";
	
	document.getElementById(currtext).style.display = "none";			//____TEXT
	document.getElementById(nexttext).style.display = "block";
	
	document.getElementById(currimage).style.display = "none";			//____IMAGE
	document.getElementById(nextimage).style.display = "block";
		
	curr= next;
	}


function newWinimage(image,title,texty,wid,hgt){		//__________________________________________________Open_new_pop-up_windows_to_display_images_and_text.
	var textually=document.getElementById(texty).innerHTML;
		wintitle=title;
	sw=(screen.width-wid)/2;					//locate_new_window
	sh=(((screen.height-hgt)/2)-120);
	tmp=parseInt(hgt); tmp+=230; hite=(""+tmp);//Make_Window_taller_for_Text
	tmp=parseInt(wid); tmp+=120; wide=(""+tmp);//Make_Window_wider
	wintitle=window.open('',''+title+'','width='+wide+',height='+hite+',scrollbars=1,menubars=0,toolbars=0,location=0,directories=0,status=0,top='+sh+',left='+sw+'');
	wintitle.document.open();
	wintitle.document.write('<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"\n'); 
	wintitle.document.write('"http://www.w3.org/TR/html4/loose.dtd">');
	wintitle.document.write('\n<html>\n<head>\n<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />\n');
	wintitle.document.write('<meta http-equiv="Imagetoolbar" content="no" />\n');
	wintitle.document.write('<title>'+title+'</title>\n');
	wintitle.document.write('<link rel="stylesheet" href="styles/lilstyle.css" type="text/css" />');
	wintitle.document.write('<link rel="shortcut icon" href="img/favicon.ico"/>');
	wintitle.document.write('</head>');
	wintitle.document.write('<body><div id="image" width:wid height:hgt><img src="'+image+'" width="'+wid+'" height="'+hgt+'" /></div>');
	wintitle.document.write('<p>'+textually+'</p>')
	wintitle.document.write('\n</body></html>');
	wintitle.document.close();
	wintitle.focus();
	}	

function newREZwin(filee,title){						//__________________________________________________Open_new_pop-up_windows_to_display_resumes.
	var textually=document.getElementById(filee).innerHTML;
		wintitle=title;
	wintitle=window.open('',''+title+'','width=600,height=850,scrollbars=1,menubars=0,toolbars=0,location=0,directories=0,status=0');
	wintitle.document.open();
	wintitle.document.write('<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"\n'); 
	wintitle.document.write('"http://www.w3.org/TR/html4/loose.dtd">');
	wintitle.document.write('\n<html>\n<head>\n<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />\n');
	wintitle.document.write('<meta http-equiv="Imagetoolbar" content="no" />\n');
	wintitle.document.write('<title>'+title+'</title>\n');
	wintitle.document.write('<link rel="stylesheet" href="styles/rezstyles.css" type="text/css" />');
	wintitle.document.write('<link rel="shortcut icon" href="img/favicon.ico"/>');
	wintitle.document.write('</head><body>');
	wintitle.document.write(''+textually+'');
	wintitle.document.write('\n</body></html>');
	wintitle.document.close();
	wintitle.focus();
	}


														//_________________________________________________OPEN_POP_UP_WINDOW_FOR_MUSIQ_FILES.
 function PlayerOpen(soundfiledesc,soundfilepath) {
    PlayWin = window.open('',UniqueID,'width=320,height=160,top=' + newWinOffset +',left=0,resizable=0,scrollbars=0,titlebar=0,toolbar=0,menubar=0,status=0,directories=0,personalbar=0');
	PlayWin.document.open()
	PlayWin.document.write('<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"');
	PlayWin.document.write('"http://www.w3.org/TR/html4/loose.dtd">');
	PlayWin.document.write('<html>');
	PlayWin.document.write('\n<html>\n<head>\n<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />\n');
	PlayWin.document.write('<meta http-equiv="Imagetoolbar" content="no" />\n');
	PlayWin.document.write('<title>'+soundfiledesc+'</title>\n');
	PlayWin.document.write('<link rel="stylesheet" href="styles/lilstyle.css" type="text/css" />');
	PlayWin.document.write('<link rel="shortcut icon" href="img/favicon.ico"/>');
	PlayWin.document.write('</head>');
	PlayWin.document.write('<BODY style="background: gray url(styles/bg_starz6.gif) repeat top right">');
	PlayWin.document.write('<B style="font-size:24px;background-color:gray; font-family:helvetica, ariel,sans-serif;line-height:1.5;">' + soundfiledesc + '</B>');
	PlayWin.document.write('<OBJECT width="300" height="42">');
	PlayWin.document.write('<param name="SRC" value=' + soundfilepath + '>');
	PlayWin.document.write('<param name="AUTOPLAY" VALUE="true">');
	PlayWin.document.write('<param name="CONTROLLER" VALUE="true">');
	PlayWin.document.write('<param name="BGCOLOR" VALUE="#FF9900">');
	PlayWin.document.write('<EMBED SRC=' + soundfilepath + ' AUTOSTART="TRUE" LOOP="FALSE" WIDTH="300" HEIGHT="42" CONTROLLER="TRUE" BGCOLOR="yellow"></EMBED>');
	PlayWin.document.write('</OBJECT><br>');
	PlayWin.document.write('<span style="font-size:18px;font-family:helvetica, ariel,sans-serif;left:100px;"><a style="color:black; background-color:gray;padding:1px;" href='+ soundfilepath +'>Download this file</a></span><br><br>');
	PlayWin.document.write('<FORM><DIV align="center"><INPUT type="button" value="Close this window" onclick="javascript:window.close();"></DIV></FORM>');
	PlayWin.document.write('\n</body></html>');
	PlayWin.document.close();
	PlayWin.focus();
	UniqueID = UniqueID + 1 ;
	newWinOffset = newWinOffset + 20; // subsequent pop-ups will be this many pixels lower
	}	
	
	
	