﻿function deschide(fisier)
{
	w=500;
	h=350;
	window.open(fisier,"win1","width="+w+",height="+h+",left="+(window.screen.width-w)/2+",top="+(window.screen.height-h)/2+",scrollbars");
}

function deschide1(imagine)
{
	w=660;
	h=500;
	window.open(imagine,"win2","width="+w+",height="+h+",left="+(window.screen.width-w)/2+",top="+(window.screen.height-h)/2);
}

function deschide2(imagine)
{
	h=660;
	w=500;
	window.open(imagine,"win2","width="+w+",height="+h+",left="+(window.screen.width-w)/2+",top="+(window.screen.height-h)/2);
}

function deschide3(imagine)
{
	w=680;
	h=520;
	window.open(imagine,"win2","width="+w+",height="+h+",left="+(window.screen.width-w)/2+",top="+(window.screen.height-h)/2+",scrollbars");
}

function deschide4(imagine)
{
	w=520;
	h=680;
	window.open(imagine,"win2","width="+w+",height="+h+",left="+(window.screen.width-w)/2+",top="+(window.screen.height-h)/2+",scrollbars");
}

function afisare(carte,cap1,cap2,vers1,vers2)
{
	w=500;
	h=350;
	window.open("sb/text.php?carte="+carte+"&cap1="+cap1+"&cap2="+cap2+"&vers1="+vers1+"&vers2="+vers2,"win1","width="+w+",height="+h+",left="+(window.screen.width-w)/2+",top="+(window.screen.height-h)/2+",scrollbars");
}

function afisare_com(carte,cap,vers) // comentariu McDonald
{
	w=500;
	h=350;
	window.open("com/com_mcdonald.php?carte_com="+carte+"&cap_com="+cap+"&vers_com="+vers,"win1","width="+w+",height="+h+",left="+(window.screen.width-w)/2+",top="+(window.screen.height-h)/2+",scrollbars");
}

function afisare_com1(carte,cap,vers) // comentariu Altul
{
	w=500;
	h=350;
	window.open("com/com_altul.php?carte_com="+carte+"&cap_com="+cap+"&vers_com="+vers,"win1","width="+w+",height="+h+",left="+(window.screen.width-w)/2+",top="+(window.screen.height-h)/2+",scrollbars");
}

function deleteCookies()
{
	var expirationDate = new Date();
	var currYear = expirationDate.getYear();
	expirationDate.setYear(currYear - 1);
	expirationDate = expirationDate.toGMTString();
	var dc = document.cookie;
	var tempString = "";
	var tempChar;
	var count = 0;
	var cookieLength = dc.length;

	while (count < cookieLength)
	{
		tempChar = dc.charAt(count);
		if (tempChar == '=')
		{
			document.cookie = tempString + "=null; expires= " + expirationDate;
			tempString = "";
		}
		else if (tempChar == ';')
			tempString = "";
		else if (tempChar != " ")
			tempString += tempChar;
		count += 1;
	}	
}
