<!--
// Zonshine.com main JavaScript Document
function isMSIE()
{
	var detect = navigator.userAgent.toLowerCase();
	return(detect.indexOf('msie')+1);
}

function ZonPopupImage(
	thumburl,	// thumb url
	thumbtit, // thumb title
	picurl,		// picture url
	pictit,		// picture title
	picw,			// picture width
	pich			// picture height
)
{
	return(
		'<p><a href="#" onClick="ZonPopImg(\'' + picurl + '\', ' + picw + ','+pich+', \'' + pictit + '\'); return false">' +
		'<img class="imgframe" src=' + thumburl + 
		' onmouseover="this.style.MozOpacity=0.7;this.filters.alpha.opacity=70"' +
		' onmouseout="this.style.MozOpacity=1;this.filters.alpha.opacity=100"' +
		' style="-moz-opacity:1;filter:alpha(opacity=100);cursor:pointer"></a></p>' +
		' <p class="pictitle">' + thumbtit + '</p>'
	);
}

function ZonPopImg(img, imgw, imgh, desc)
{
	var winw, winh, winattr;

	if (imgh > screen.height - 50) {
		winattr = ',scrollbars=yes,status=no,toolbar=no,resizable=no,location=no,dependent=yes,menu=no';
		winw = imgw + 60;
		winh = screen.height - 100;
	}
	else {
		winattr = ',scrollbars=yes,status=no,toolbar=no,resizable=no,location=no,dependent=yes,menu=no';
		winw = imgw + 60;
		winh = imgh + (desc != "" ? 85 : 65);
	}

	// try to use existing image window
	if (typeof zonwin=="undefined" || zonwin.closed) {
		zonwin = window.open("", "", winattr);
		zonwin.moveTo((screen.width - winw) / 2, (screen.height - winh) / 2);
	}
	zonwin.resizeTo(winw, winh);
	zonwin.document.open();
	zonwin.document.write('<html><head><meta http-equiv="Content-Type" content="text/html; charset=windows-1255">' +
	'<title>Image Viewer</title></head><body style="text-align:center; background-color: black;">' +
	'<a href="JavaScript:onClick=window.close()"><img style="border:1px; border-style:solid; border-color:#cccccc;" src="' + 
	img + '" width="' + imgw + '" height="' + imgh + '" alt="click to close window" title="click to close window"></a>' + (desc != "" ?
	'<p style="color:white; font-family:Arial, Helvetica, sans-serif; font-size:9pt; text-align:center; margin:4px;">' + desc + '</p>' : '') +
	'</body></html>');
	zonwin.document.close();
	zonwin.focus();
}

function ZonMusicBox(title, subtitle, mp3, mp3len, mp3size, picsmall, piclarge, pictitle, piclgw, piclgh)
{
	return(
'	<table class="musictable" width="100%" cellpadding="8px">' +
'		<tr>' +
'			<td valign="top">' +
'				<table border="0" width="100%" cellpadding="0" cellspacing="0">' +
'					<tr>' +
'						<td width=60 height=100% valign=top align=center dir=ltr>' +
'							<p class="smallsep">&nbsp;</p>' + (isMSIE() ?
'							<p><img src="images/general/streamr.gif" title="click to play" alt="click to play" onClick="ZonPlaySong(\'' + mp3 +'\');"' + 
'							onmouseover="this.style.MozOpacity=0.7;this.filters.alpha.opacity=70"' +
'							onmouseout="this.style.MozOpacity=1;this.filters.alpha.opacity=100"' +
'							style="-moz-opacity:1;filter:alpha(opacity=100);cursor:pointer"></p>' : '') +
'							<p class="smallsep">&nbsp;</p>' +

'							<p><a href=' + mp3 +'><img src="images/general/download.gif" title="click to download" alt="click to download"' + 
'							onmouseover="this.style.MozOpacity=0.7;this.filters.alpha.opacity=70"' +
'							onmouseout="this.style.MozOpacity=1;this.filters.alpha.opacity=100"' +
'							style="-moz-opacity:1;filter:alpha(opacity=100);cursor:pointer"></a></p>' +
'							<p class="smallsep">&nbsp;</p>' +
'							<p class="graytextxsmall">' + mp3len + '<br>' + mp3size + '</p>' +
'						</td>' +
'						<td width="5">&nbsp;</td>' +
'      			<td valign="top" align="left">' +
'							<p class="sectiontitlehr">' + title + '</p>' +
'							<p class="smallsep">&nbsp;</p>' + 
'							<p>' + subtitle + '</p>' +
'						</td>' +
'						<td width="5">&nbsp;</td>' +
'						<td valign="top" align="center" width="125">' +
'							<p align="center">' + (piclarge!="" ?
								ZonPopupImage(picsmall, "click for larger image", piclarge, pictitle, piclgw, piclgh) :
								'<img class="imgframe" src="' + picsmall + '"><br><p class="smalltext">' + pictitle + '</p>') +
'						</td>' +
'					</tr>' +
'				</table>' +
'			</td>' +
'		</tr>' +
'	</table>' +
'	<p>&nbsp;</p>'
	);
}

function ZonMusicBoxNoPic(title, subtitle, mp3, mp3len, mp3size)
{
	return(
'	<table class="musictable" width="100%" cellpadding="8px">' +
'		<tr>' +
'			<td valign="top">' +
'				<table border="0" width="100%" cellpadding="0" cellspacing="0">' +
'					<tr>' +
'						<td class="graytextxsmall" width=60 height=100% valign=top align=center dir=ltr>' +
'							<p class="smallsep">&nbsp;</p>' + (isMSIE() ?
'							<p><img src="images/general/streamr.gif" title="click to play" alt="click to play" onClick="ZonPlaySong(\'' + mp3 +'\');"' + 
'							onmouseover="this.style.MozOpacity=0.7;this.filters.alpha.opacity=70"' +
'							onmouseout="this.style.MozOpacity=1;this.filters.alpha.opacity=100"' +
'							style="-moz-opacity:1;filter:alpha(opacity=100);cursor:pointer"></p>' : '') +
'							<p class="smallsep">&nbsp;</p>' +

'							<p><a href=' + mp3 +'><img src="images/general/download.gif" title="click to download" alt="click to download"' + 
'							onmouseover="this.style.MozOpacity=0.7;this.filters.alpha.opacity=70"' +
'							onmouseout="this.style.MozOpacity=1;this.filters.alpha.opacity=100"' +
'							style="-moz-opacity:1;filter:alpha(opacity=100);cursor:pointer"></a></p>' +
'							<p class="smallsep">&nbsp;</p>' +
							(isMSIE() ? '' : '<p>click to download</p>') + 
'							<p>' + mp3len + '<br>' + mp3size + '</p>' +
'						</td>' +
'						<td width="5">&nbsp;</td>' +
'						<td valign="top" align="left">' +
'							<p class="sectiontitlehr">' + title + '</p>' +
'							<p class="smallsep">&nbsp;</p>' + 
'							<p>' + subtitle + '</p>' +
'						</td>' +
'					</tr>' +
'				</table>' +
'			</td>' +
'		</tr>' +
'	</table>' +
'	<p><br></p>'
	);
}

function ZonVideoBox(title, subtitle, vid, vidlen, vidsize, picsmall, piclarge, pictitle, piclgw, piclgh)
{
	return(
'	<table class="videotable" width="100%" cellpadding="8px">' +
'		<tr>' +
'			<td valign="top">' +
'				<table border="0" width="100%" cellpadding="0" cellspacing="0">' +
'					<tr>' +
'						<td class="graytextxsmall" width=60 height=100% valign=top align=center dir=ltr>' +
'							<p class="smallsep">&nbsp;</p>' +
'							<p><a href=' + vid +' target=_blank><img src="images/general/download.gif" title="click to download" alt="click to download"' + 
'							onmouseover="this.style.MozOpacity=0.7;this.filters.alpha.opacity=70"' +
'							onmouseout="this.style.MozOpacity=1;this.filters.alpha.opacity=100"' +
'							style="-moz-opacity:1;filter:alpha(opacity=100);cursor:pointer"></a></p>' +
'							<p class="smallsep">&nbsp;</p>' +
'							<p>' + vidlen + '<br>' + vidsize + '</p>' +
'						</td>' +
'						<td width="5"></td>' +
'						<td valign="top" align="left">' +
'							<p class="sectiontitlehr">' + title + '</p>' +
'							<p class="smallsep">&nbsp;</p>' + 
'							<p>' + subtitle + '</p>' +
'						</td>' +
'						<td valign="top" align="center" width="135">' +
'							<p align="center">' +
							ZonPopupImage(picsmall, "click for larger image", piclarge, pictitle, piclgw, piclgh) +
'						</td>' +
'					</tr>' +
'				</table>' +
'			</td>' +
'		</tr>' +
'	</table>' +
'	<p><br></p>'
	);
}

function ZonPhotoBox(title, subtitle, picsmall, piclarge, pictitle, piclgw, piclgh)
{
	return(
'			<table class="musictable" width="100%" cellpadding="8px">' +
'				<tr>' +
'					<td valign="top">' +
'						<table border="0" width="100%" cellpadding="0" cellspacing="0">' +
'							<tr>' +
'								<td width="5"></td>' +
'          			<td valign="top">' +
'									<p class="sectiontitlehr">' + title + '</p>' +
'									<p class="smallsep">&nbsp;</p>' + 
'									<p>' + subtitle + '</p>' +
'								</td>' +
'								<td valign="top" align="center" width="135">' +
'									<p align="center">' +
									(piclarge!="" ?
									ZonPopupImage(picsmall, "click for larger image", piclarge, pictitle, piclgw, piclgh) :
									'<img class="imgframe" src="' + picsmall + '"><br><p class="smalltext">' + pictitle + '</p>') +
'								</td>' +
'							</tr>' +
'						</table>' +
'					</td>' +
'				</tr>' +
'			</table>' +
'			<p><br></p>'
	);
}

function createTopMenuEntry(url, img, title)
{
	if (document.URL.indexOf(url)>=0){
		return ('<img class="imgblueframe" src="'+ img + '"><br><span class="topcurlink">' + title + '<\/span>');
	}
	else {
		return ('<a class="toplink" href="' + url + 
			'"><img class="imgframe" src="'+ img + '" width="50" height="50"' +
			' onmouseover="this.style.MozOpacity=1;this.filters.alpha.opacity=100"' +
			'	onmouseout="this.style.MozOpacity=0.7;this.filters.alpha.opacity=70"' +
			'	style="-moz-opacity:0.7;filter:alpha(opacity=70);cursor:pointer"' +
			'><br>' + title + '<\/a>');
	}
}

function createProjectEntry(url, img, title, body, dates)
{
	return(
'<table class="musictable" width="100%" cellpadding="8px">' +
'  <tr>' +
'    <td width="82">' +
'      <p><a href="' + url + '"><img class="imgframe" src="'+ img + '" width="80" height="80"' +
'		onmouseover="this.style.MozOpacity=0.7;this.filters.alpha.opacity=70"' +
'		onmouseout="this.style.MozOpacity=1;this.filters.alpha.opacity=100"' +
'		style="-moz-opacity:1;filter:alpha(opacity=100);cursor:pointer"></a></p>' +
'    </td>' +
'    <td align="left" valign="top">' +
'      <p class="sectiontitlehr"><a href="' + url + '">' + title + '</a></p>' +
'      <p class="smallsep"><br></p>' +
'      <p>' + body + '</p>' +
'      <p class="smallsep"><br></p>' +
'      <p class="graytextsmall">' + dates + '</p>' +
'    </td>' +
'  </tr>' +
'</table>' +
'<p><br></p>'
	);
}

function createPageTitle(title, pgbody, addinfo, img)
{
	return(
'<table class="pagetitletable" cellPadding="0">' +
'	<tr>' +
'		<td rowspan="2" width="90" align="center" valign="top">' +
'			<img class="imgframe" src="' + img + '" width="65" height="65"><\/td>' +
'		<td align="left">' +
'			<span class="pagetitle">' + title + '<\/span>' +
'		<\/td>' +
'		<td rowspan="2" align="center" width="30">&nbsp;<td>' +
'	<\/tr>' +
'	<tr>' +
'		<td align="left">' +
'			<p class="smallsep">&nbsp;<\/p>' +
'			<p class="pagesubtitle" style="margin-bottom:2px;">' + pgbody + '<\/p>' +
'			<p class="graytext">' +addinfo + '<\/p>' +
'		</td>' +
'	<\/tr>' +
'<\/table>' +
'<br>'
	);
}

function hcreatePrevNextProjLinks(prevname, prevurl, nextname, nexturl)
{
	var prevstr, prevarrow, nextstr, nextarrow;

	if (prevname=="") {
		prevstr='&nbsp;';
		prevarrow='&nbsp;';
	}
	else {
		prevstr='<a class="smalltext" href="'+prevurl+'">ÜäèÕÙÙçØ ÔçÕÓÝ<br>(\"'+prevname+'\")</a>';
		prevarrow='<span class="Webdings">4</span>';
	}

	if (nextname=="") {
		nextstr='&nbsp;';
		nextarrow='&nbsp;';
	}
	else {
		nextstr='<a class="smalltext" href="'+nexturl+'">ÜäèÕÙÙçØ ÔÑÐ<br>(\"'+nextname+'\")</a>';
		nextarrow='<span class="Webdings">3</span>';
	}

	return(
'<br><br>' +
'<table class="lasttable" cellPadding=0>' +
'	<tr>' +
'		<td align=right width=3%>' + prevarrow + '</td>' +
'		<td align=right width=22%>' + prevstr + '</td>' +
'		<td align=center width=25%><a class="smalltext" href="hProjects.html">Ñ×ÖèÔ ÜÓã<br>ÔäèÕÙÙçØÙÝ</a></td>' +
'		<td align=center width=25%>' +
'<div id="menu1" class="menu">' +
'  <ul>' +
'  	<li><a href="hGviotai.html">ÒÕÕÙÕêÙ ÕèÑÕêÙ</a></li>' +
'  	<li><a href="hBetrayal.html">ÑÒÙÓÔ</a></li>' +
'  	<li><a href="hWhyNotMe.html">ÜÞÔ ÜÐ ÐàÙ?</a></li>' +
'  	<li><a href="hTCO.html">Òß ÔÓÕÑÓÑàÙÝ</a></li>' +
'   <li><a href="hKeren2.html">ÔÙÕ ÜÙÜÕê</a></li>' +
'  	<li><a href="hAnimalFarm.html">×ÕÕê Ô×ÙÕê</a></li>' +
'  	<li><a href="hSilence.html">ÓÞÞÔ</a></li>' +
'  	<li><a href="hUpperLevel.html">ÔÞäÜá ÔâÜÙÕß</a></li>' +
'  	<li><a href="hMagnaHarta.html">ÞÐÒàÔ ×ÐèØÔ</a></li>' +
'   <li><a href="hSujud.html">áÕÒ\'ÕÓ</a></li>' +
'   <li><a href="hMaratSade.html">ÞèÔ / áÐÓ</a></li>' +
'   <li><a href="hGCD.html">ÐéäÔ, ÔâÙè ÕÔÞÕÕê</a></li>' +
'   <li><a href="hListen.html">ÐÝ àÓâ ÜÔçéÙÑ</a></li>' +
'   <li><a href="hBrimstone.html">ÒÕäèÙê ÕæÕèÙ</a></li>' +
'  </ul>' +
'</div>' +
'<a class="smalltext" href="javascript:;" onmouseover="menuLayers.show(\'menu1\', event)" onmouseout="menuLayers.hide()">Ñ×ÙèÔ<br>ÞÔÙèÔ</a>	</td>' +
'		<td align=left width=22%>' + nextstr + '</td>' +
'		<td align=left width=3%>' + nextarrow + '</td>' +
'	</tr>' +
'</table>'
	);
}


// my cookie scripts
function setCookie(name, value, expires, path, domain, secure)
{
	document.cookie= name + "=" + escape(value) +
		((expires) ? "; expires=" + expires.toGMTString() : "") +
		((path) ? "; path=" + path : "") +
		((domain) ? "; domain=" + domain : "") +
		((secure) ? "; secure" : "");
}

function getCookie(name)
{
	var dc = document.cookie;
	var prefix = name + "=";
	var begin = dc.indexOf("; " + prefix);
	if (begin == -1){
		begin = dc.indexOf(prefix);
		if (begin != 0) return null;
	}
	else{
		begin += 2;
	}
	var end = document.cookie.indexOf(";", begin);
	if (end == -1){
		end = dc.length;
	}
	return unescape(dc.substring(begin + prefix.length, end));
}

function deleteCookie(name, path, domain)
{
	if (getCookie(name)){
		document.cookie = name + "=" + 
			((path) ? "; path=" + path : "") +
			((domain) ? "; domain=" + domain : "") +
			"; expires=Thu, 01-Jan-70 00:00:01 GMT";
	}
}
// -->