function sendToFriend()
{
	var strPath = '../send_to_friend/send_to_friend_he.html';
	var sendToFriendWin = window.open(strPath,'PopUp','width=520,height=520,scrollbars,resizable');
	sendToFriendWin.focus();
}

/////////////resize image popup//////////////

var imageWin;//must be global

function resizeImageWin()
{		
	//alert(imageWin.document.images[0].width);
	var winWidth = imageWin.document.images[0].width + 40;
	var winHeight = imageWin.document.images[0].height + 105;
	winHeight = winHeight > screen.height - 30 ? screen.height - 30 : winHeight;
	
	imageWin.resizeTo(winWidth, winHeight);
	imageWin.focus();
}

////////////image popup/////////////////////

function showImage(linkObj)
{
var imgObj = linkObj.firstChild;
if (imgObj.src.indexOf("_ill.") != -1 || imgObj.src.indexOf("_gal.") != -1)
{
	var strImgSrc = imgObj.src.substring(0,  imgObj.src.lastIndexOf(".") - 4) + "_big" + imgObj.src.substring(imgObj.src.lastIndexOf("."));
}
else
{
	var strImgSrc = imgObj.src.substring(0,  imgObj.src.lastIndexOf(".")) + "_big" + imgObj.src.substring(imgObj.src.lastIndexOf("."));
}

var strAltText = imgObj.alt;
var strTitleText = "Copyright &copy; 2004 Paintball Israel";
imageWin=window.open("","winImage","top=0,left=0,width=600,height=510,resizable=yes");

with(imageWin.document)
	{
		open();
		write("<html><head><title>Paintball Israel - " + strAltText + "</title>");
		write("<link rel='stylesheet' type='text/css' href='../_css/general_pb_he.css'>");
		write("<link rel='stylesheet' type='text/css' media='print' href='../_css/print_pb_he.css'>");
		write("</head><body dir='rtl' onload='opener.resizeImageWin()'><table align='center'><tr><td>");
		write("<img src='" + strImgSrc + "' title='" +strTitleText +"' alt='" + strAltText + "'><br></td></tr>");
		write("<tr class='noPrint'><td align='center'><form>");
		write("<button style='margin:2 0 0 20' class='button' onClick='window.close();' title='Close'>Close</button>");
		write("<button style='margin:2 20 0 0' class='button' onClick='window.print();' title='Print'>Print</button>");
		write("</form></td></tr></table></body></html>");
		close();
	}
return false;
}

////////////map popup/////////////////////

function showMap(strImgSrc)
{
var strAltText = "Map";
var strTitleText = "Copyright &copy; 2004 Paintball Israel";
imageWin=window.open("","winImage","top=0,left=0,width=680,height=450,resizable=yes");

with(imageWin.document)
	{
		open();
		write("<html><head><title>Paintball Israel - " + strAltText + "</title>");
		write("<link rel='stylesheet' type='text/css' href='../_css/general_pb_he.css'>");
		write("<link rel='stylesheet' type='text/css' media='print' href='../_css/print_pb_he.css'>");
		write("</head><body dir='rtl'><table align='center'><tr><td>");
		write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="640" height="371" id="map_center" align="middle">');
		write('<param name="allowScriptAccess" value="sameDomain" /><param name="movie" value="' + strImgSrc + '" />');
		write('<param name="quality" value="high" /><param name="bgcolor" value="#ffffff" />');
		write('<embed src="' + strImgSrc + '" quality="high" bgcolor="#ffffff" width="640" height="371" name="map_center" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /></object>');
		write('</td></tr>');
		write("<tr class='noPrint'><td align='center'><form>");
		write("<button style='margin:2 0 0 20' class='button' onClick='window.close();' title='Close'>Close</button>");
		write("<button style='margin:2 20 0 0' class='button' onClick='window.print();' title='Print'>Print</button>");
		write("</form></td></tr></table></body></html>");
		close();
	}
	imageWin.resizeTo(680,450);
	imageWin.focus();

}
////
////////imgFromLink popup/////////////////////

function showImgFromLink(strImgSrc)
{
var strAltText = "";
var strTitleText = "Copyright &copy; 2004 Paintball Israel";
imageWin=window.open("","winImage","top=0,left=0,width=600,height=510,resizable=yes");

with(imageWin.document)
	{
		open();
		write("<html><head><title>Paintball Israel</title>");
		write("<link rel='stylesheet' type='text/css' href='../_css/general_pb_he.css'>");
		write("<link rel='stylesheet' type='text/css' media='print' href='../_css/print_pb_he.css'>");
		write("</head><body dir='rtl' onload='opener.resizeImageWin()'><table align='center'><tr><td>");
		write("<img src='" + strImgSrc + "' title='" +strTitleText +"' alt=''><br></td></tr>");
		write("<tr class='noPrint'><td align='center'><form>");
		write("<button style='margin:2 0 0 20' class='button' onClick='window.close();' title='Close'>Close</button>");
		write("<button style='margin:2 20 0 0' class='button' onClick='window.print();' title='Print'>Print</button>");
		write("</form></td></tr></table></body></html>");
		close();
	}
}

///////////////card popup/////////////////////

function openCard(strImgSrc)
{
var strAltText = "Card";
var strTitleText = "Copyright &copy; 2004 Paintball Israel";
imageWin=window.open("","winImage",'top=0,left=0,width=640,height=600,scrollbars,resizable,toolbar,menubar');

with(imageWin.document)
	{
		open();
		write("<html><head><title>Paintball Israel - " + strAltText + "</title>");
		write("<link rel='stylesheet' type='text/css' href='../_css/general_pb_he.css'>");
		write("<link rel='stylesheet' type='text/css' media='print' href='../_css/print_pb_he.css'>");
		write("</head><body dir='rtl' onload='opener.resizeImageWin()'><table align='center'><tr><td>");
		write("<img src='" + strImgSrc + "' title='" +strTitleText +"' alt='" + strAltText + "'><br></td></tr>");
		write("<tr class='noPrint'><td align='center'><form>");
		write("<button style='margin:2 0 0 20' class='button' onClick='window.close();' title='Close'>Close</button>");
		write("<button style='margin:2 20 0 0' class='button' onClick='window.print();' title='Print'>Print</button>");
		write("</form></td></tr></table></body></html>");
		close();
	}
}
///////////////html popup/////////////////////

function openPopUp(strPath)
{
popUpWin=window.open(strPath,"PopUp",'top=0,left=0,width=660,height=450,scrollbars,resizable,toolbar,menubar');
popUpWin.focus();
}
///////////////video popup/////////////////////

function openVideoPopUp(strPath)
{
popUpWin=window.open(strPath,"PopUp",'top=0,left=0,width=460,height=370,scrollbars,resizable');
popUpWin.focus();
}