function SaveEnable(table,id,val)
{
	window.open ('/_admin/_inc/SaveEnable.asp?table='+table+'&id='+id+'&val='+val,'SaveEnable','width=10,height=10,top=0,left=0');
}

function DelRecord(table,id)
{
	if (confirm('Θέλετε να διαγράψετε την εγγραφή;'))
	{
	//window.open('/_admin/_inc/DelRecord.asp?table='+table+'&id='+id,'DelRec','Width=1,Height=1,top=0.left=0');
	document.all.IframeFun.src='/_admin/_inc/DelRecord.asp?table='+table+'&id='+id
	//top.opener.document.all.location.reload();
	
	}
}

function DelRecordD(table,id)
{
	if (confirm('Θέλετε να διαγράψετε την εγγραφή;'))
	{
	//window.open('/_admin/_inc/DelRecord.asp?table='+table+'&id='+id,'DelRec','Width=1,Height=1,top=0.left=0');
	document.all.IframeFun.src='/_admin/_inc/DelRecordD.asp?table='+table+'&id='+id
	//top.opener.document.all.location.reload();
	
	}
}

function DelRecord01(table,id)
{
	if (confirm('Θέλετε να διαγράψετε την εγγραφή και να αντιλογιστή;'))
	{
	//window.open('/_admin/_inc/DelRecord.asp?table='+table+'&id='+id,'DelRec','Width=1,Height=1,top=0.left=0');
	document.all.IframeFun.src='/_admin/_inc/DelRecordAnt.asp?table='+table+'&id='+id
	//top.opener.document.all.location.reload();
	
	}
}

function DelRecord02(table,id)
{
	if (confirm('Θέλετε να διαγράψετε την εγγραφή και να αντιλογιστή;'))
	{
	//window.open('/_admin/_inc/DelRecord.asp?table='+table+'&id='+id,'DelRec','Width=1,Height=1,top=0.left=0');
	document.all.IframeFun.src='/_admin/_inc/SaveEnable00.asp?table='+table+'&id='+id
	//top.opener.document.all.location.reload();
	
	}
}


function open_window_center(page_,width_,height_)
{
	var sizeScreeW=(screen.width-width_)/2;
	var sizeScreeH=(screen.height-height_)/2;
	window.open(page_,width_+'01','width='+width_+',height='+height_+',top='+sizeScreeH+',scrollbars=yes,left='+sizeScreeW)
}

function open_window_center_no_scr(page_,width_,height_)
{
	var sizeScreeW=(screen.width-width_)/2;
	var sizeScreeH=(screen.height-height_)/2;
	window.open(page_,width_+'02','width='+width_+',height='+height_+',top='+sizeScreeH+',scrollbars=no,left='+sizeScreeW)
}


function AddRecord(table,page_)
{
	if (confirm('Θέλετε νέα εισαγωγή στοιχείων;'))
	{
	top.window.location.href='/_admin/_inc/AddRecord.asp?table='+table+'&page_='+page_;
	}
}
function AddRecord00(table,page_)
{
	if (confirm('Θέλετε νέα εισαγωγή στοιχείων;'))
	{
	document.location.href='/_admin/_inc/AddRecord.asp?table='+table+'&page_='+page_;
	}
}

function AddRecord01(table,page_)
{
	if (confirm('Θέλετε νέα εισαγωγή στοιχείων;'))
	{
	window.location.href='/_admin/_inc/AddRecord01.asp?table='+table+'&page_='+page_;
	}
}

function AddRecord02(table,page_)
{
	if (confirm('Θέλετε νέα εισαγωγή στοιχείων;'))
	{
	window.open('/_admin/_inc/AddRecord.asp?table='+table+'&page_='+page_,'NewP','width=573,height=278,top=200,left=200')
	//document.location.href='/_admin/_inc/AddRecord.asp?table='+table+'&page_='+page_;
	}
}

function AddRecord03(table,page_,w_,h_)
{
	var sizeScreeW=(screen.width-w_)/2;
	var sizeScreeH=(screen.height-h_)/2;
	
	if (confirm('Θέλετε νέα εισαγωγή στοιχείων;'))
	{
	window.open('/_admin/_inc/AddRecord.asp?table='+table+'&page_='+page_,'NewP','width='+w_+',height='+h_+',top='+sizeScreeH+',left='+sizeScreeW)
	//document.location.href='/_admin/_inc/AddRecord.asp?table='+table+'&page_='+page_;
	}
}

function SelectonP(Val)
{
	if (Val!='')
	{
		top.document.location.href=Val;
	}
}
function InSide(_text)
{
	_text.style.background="#FFFFD5";
	_text.style.border="1px solid #ff0000";
}
function OutSide(_text)
{
	_text.style.background="#ffffff";
	_text.style.border="1px solid #000000";
}
function InSideOpen(_text,page_,attr_)
{
	_text.style.background="#ffffff";
	_text.style.border="1px solid #000000";
	window.open(page_,'Location','width=350,height=300,'+attr_+',scrollbars=yes');
}
function InSideOpen01(_text,page_,attr_)
{
	if (document.all.Item_Id.value!='0')
	{
	_text.style.background="#ffffff";
	_text.style.border="1px solid #000000";
	window.open(page_,'Location','width=350,height=300,'+attr_+',scrollbars=yes');
	}
	else
	{
		alert ('Επιλέξτε Είδος');
	}
}
function TransPopUpVal(Val01,Val02)
{
	top.opener.document.all.LOCATIONID.value=Val01;
	top.opener.document.all.LOCATION.value=Val02;
	window.close();
}

function TransPopUpVal01(Val01,Val02)
{
	top.opener.document.all.MakeCode_Id.value=Val01;
	top.opener.document.all.MakeCode.value=Val02;
	window.close();
}

function TransPopUpVal02(Val01,Val02)
{
	top.opener.document.all.City_Id.value=Val01;
	top.opener.document.all.City.value=Val02;
	window.close();
}


function TransPopUpVal03(Val01,Val02)
{
	top.opener.document.all.ItemCategory_Id.value=Val01;
	top.opener.document.all.ItemCategory.value=Val02;
	window.close();
}

function TransPopUpVal04(Val01,Val02,Val03)
{
	top.opener.document.all.CustomersVendor_Id.value=Val01;
	top.opener.document.all.Code.value=Val02;
	top.opener.document.all.CustomersVendor.value=Val03;
	window.close();
}

function TransPopUpVal04b(Val01,Val02,Val03)
{
	top.opener.document.all.CustomersVendor01_Id.value=Val01;
	top.opener.document.all.Code01.value=Val02;
	top.opener.document.all.CustomersVendor01.value=Val03;
	window.close();
}

function TransPopUpVal05(Val01,Val02,Val03,Val04)
{
	top.opener.document.all.Item_Id.value=Val01;
	top.opener.document.all.Code.value=Val02;
	top.opener.document.all.Item.value=Val03;
	top.opener.document.all.Price.value=Val04;
	window.close();
}

function TransPopUpVal06(Val01,Val02,Val03)
{
	top.opener.document.all.ItemPosition_Id.value=Val01;
	top.opener.document.all.Position.value=Val02;
	top.opener.document.all.LQuantity.value=Val03;
	window.close();
}

function TransPopUpVal07(Val01,Val02)
{
	top.opener.document.all.Doy_Id.value=Val01;
	top.opener.document.all.Doy.value=Val02;
	window.close();
}

function TransPopUpVal08(Val01,Val02)
{
	top.opener.document.all.Occupation_Id.value=Val01;
	top.opener.document.all.Occupation_.value=Val02;
	window.close();
}

function open_window_center(page_,width_,height_)
{
	var sizeScreeW=(screen.width-width_)/2;
	var sizeScreeH=(screen.height-height_)/2;
	window.open(page_,width_,'width='+width_+',height='+height_+',top='+sizeScreeH+',scrollbars=yes,left='+sizeScreeW)
}

function no_src_open_window_center(page_,width_,height_)
{
	var sizeScreeW=(screen.width-width_)/2;
	var sizeScreeH=(screen.height-height_)/2;
	window.open(page_,width_,'width='+width_+',height='+height_+',top='+sizeScreeH+',scrollbars=no,left='+sizeScreeW)
}

	var ns4 = document.layers;
	var ns6 = document.getElementById && !document.all;
	var ie4 = document.all;
	offsetX = 0;
	offsetY = 20;
	var toolTipSTYLE="";
	function initToolTips()
	{
	  if(ns4||ns6||ie4)
	  {
	    if(ns4) toolTipSTYLE = document.toolTipLayer;
	    else if(ns6) toolTipSTYLE = document.getElementById("toolTipLayer").style;
	    else if(ie4) toolTipSTYLE = document.all.toolTipLayer.style;
	    if(ns4) document.captureEvents(Event.MOUSEMOVE);
	    else
	    {
	      toolTipSTYLE.visibility = "visible";
	      toolTipSTYLE.display = "none";
	    }
	    document.onmousemove = moveToMouseLoc;
	  }
	}
	function toolTip(msg, fg, bg, width_of_text)
	{
	  if(toolTip.arguments.length < 1) // hide
	  {
	    if(ns4) toolTipSTYLE.visibility = "hidden";
	    else toolTipSTYLE.display = "none";
	  }
	  else // show
	  {
	    if(!fg) fg = "#777777";
	    if(!bg) bg = "#FFFFFF";
	    var content =
	    '<table border="0" cellspacing="0" cellpadding="1" bgcolor="' + fg + '"><tr><td>' +
	    '<table border="0" cellspacing="0" cellpadding="1" width="' + width_of_text +'" bgcolor="' + bg + 
	    '"><tr><td align="center"><font face="sans-serif" color="' + fg +
	    '" size="-2">&nbsp\;' + msg +
	    '&nbsp\;</font></td></tr></table></td></tr></table>';
	    if(ns4)
	    {
	      toolTipSTYLE.document.write(content);
	      toolTipSTYLE.document.close();
	      toolTipSTYLE.visibility = "visible";
	    }
	    if(ns6)
	    {
	      document.getElementById("toolTipLayer").innerHTML = content;
	      toolTipSTYLE.display='block'
	    }
	    if(ie4)
	    {
	      document.all("toolTipLayer").innerHTML=content;
	      toolTipSTYLE.display='block'
	    }
	  }
	}
	function moveToMouseLoc(e)
	{
	  if(ns4||ns6)
	  {
	    x = e.pageX;
	    y = e.pageY;
	  }
	  else
	  {
	    x = event.x + document.body.scrollLeft;
	    y = event.y + document.body.scrollTop;
	  }
	  toolTipSTYLE.left = x + offsetX;
	  toolTipSTYLE.top = y + offsetY;
	  return true;
	}
	

