function popitup(url)
{
	newwindow=window.open(url,'name','height=700,width=600, scrollbars=no');
	if (window.focus) {newwindow.focus()}
	return false;
}
function popitup2(url)
{
	newwindow=window.open(url,'name2','height=250,width=400, scrollbars=no');
	if (window.focus) {newwindow.focus()}
	return false;
}

function popitup3(url)
{
	newwindow=window.open(url,'name3','height=250,width=400, scrollbars=no');
	if (window.focus) {newwindow.focus()}
	return false;
}

function popitup4(url)
{
	newwindow=window.open(url,'name4','height=400,width=780px, scrollbars=yes');
	if (window.focus) {newwindow.focus()}
	return false;
}
function popitupChat(url)
{
	newwindow=window.open(url,'_blank','height=455,width=590, scrollbars=no');
	if (window.focus) {newwindow.focus()}
	return false;
}
function popitupBirthday(url)
{
	newwindow=window.open(url,'nameBirthday','height=250,width=400, scrollbars=no');
	if (window.focus) {newwindow.focus()}
	return false;
}
function popitupMsgFull(url)
{
	newwindow=window.open(url,'nameMsgFull','height=550,width=480, scrollbars=no');
	if (window.focus) {newwindow.focus()}
	return false;
}

function msgFullPopUp(url)
{
	newwindow=window.open(url,'msgFullPopUp','height=250,width=400, scrollbars=no');
	if (window.focus) {newwindow.focus()}
	return false;
}
function buyStarsPayCall(url)
{
	newwindow=window.open(url,'nameMsgFull','height=265,width=415, scrollbars=no');
	if (window.focus) {newwindow.focus()}
	return false;
}

function findMe(obj)
{
  if (obj.findMember.value==""){
    alert("יש למלא מספר כרטיס או כינוי לאיתור");
    obj.findMember.focus();
    return false;
  }
}



//הצגת תמונה קטנה כתמונה ראשית
function showBigPic(obj){
	document.getElementById("bigPic").src=obj;
}

function popImg(imageURL) {
	var imgWin = window.open('about:blank','_blank','width=200, height=200, left=100, top=100');

	with (imgWin.document) {
		writeln('<html><head><title>Loading...</title>');
		writeln('<style type="text/css"><!-- body { margin: 0px; } --></style></head>');
		writeln('<body onload="self.focus();"><img id="pic" style="display:none" /></body></html>');
		close();		
		}
	var img = new Image();
	img.onload = function() { sizeImgWin(imgWin, img) };
	img.src = imageURL;
}
	
function sizeImgWin(win, img) {
   	var new_w = img.width;
	var new_h = img.height;
	var old_w = win.innerWidth || win.document.body.offsetWidth;
	var old_h = win.innerHeight || win.document.body.offsetHeight;
	if (!new_w) { new_w = old_w; }
	if (!new_h) { new_h = old_h; }
	new_w -= old_w; new_h -= old_h;
	win.resizeBy(new_w,new_h);
	win.document.title = img.src.substring(img.src.lastIndexOf("/")+1);
	var pic = win.document.getElementById('pic');
	pic.src = img.src;
	pic.style.display = 'block';
}
