function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=1,scrollbars=1,location=1,statusbar=1,menubar=1,resizable=1,width=1280,height=800');");
}
function popupPage() {
var page = "http://www.adtour.ro";
windowprops = "height=1280,width=800,location=yes,"
+ "scrollbars=yes,menubars=yes,statusbar=yes,toolbars=yes,resizable=yes";

window.open(page, "Popup", windowprops);
}
  function pop_window(url) {
  
    window.open('http://www.registrufirme.ro/adauga_anunt_fara_inregistrare.html', 'popup', 'width=1024, height=768, top=100, left=100, menubar=1, scrollbars=1, location=1, toolbar=1,  resizable=1, status=1');
    window.blur()
    window.focus()
  }
  

function openWin(image,title)

{
	aWindow=window.open("img_large.php?img="+image+"&title="+title,"","toolbar=no,width=400,height=400,status=no,scrollbars=no,resize=no,menubars=no");
	aWindow.focus();
}

function openWin2(url,w,h)
{
	aWindow=window.open(url,"","toolbar=no,width="+w+",height="+h+",status=no,scrollbars=no,resize=no,menubars=no");
	aWindow.focus();
}
function openWin3(url,w,h,title)
{
	aWindow=window.open(url,title,"toolbar=no,width="+w+",height="+h+",status=no,scrollbars=yes,resize=no,menubars=no");
	aWindow.focus();
}


function openLargeImage(url)
{
	aWindow=window.open(url,"","toolbar=no,width=400,height=400,status=no,scrollbars=no,resize=no,menubars=no");
	aWindow.focus();
}

function openBookmark(aURL)
{
	aWindow=window.open(aURL,"","toolbar=no,width=400,height=100,status=no,scrollbars=no,resize=no,menubars=no");
	aWindow.focus();
}
function openVideo(aURL)
{
	aWindow=window.open(aURL,"","toolbar=no,width=400,height=400,status=no,scrollbars=no,resize=no,menubars=no");
	aWindow.focus();
}
function openMatchUs(aURL)
{
	aWindow=window.open(aURL,"","toolbar=no,width=400,height=200,status=no,scrollbars=no,resize=no,menubars=no");
	aWindow.focus();
}
function submitFormTA() 
{
	updateRTE('ta');
	return true;
}
function setImage(string) 
{
	document.getElementById('previewImage').src = 'File:\/\/' + string;
}

function checkSelectedOption(value,form,warning)
{
	if( value != -1 )
	{
		form.catid.value = value;
		form.submit();
	}
	else
	{
		alert(warning);
	}
}
function previewImage(string)
{		
	document.getElementById('previewImage').src = 'File:\/\/' + string;	
}
function previewImageServer(string)
{		
	if (string=="")
		document.getElementById('previewImage').src = "../catimages/blank.gif";	
	else
		document.getElementById('previewImage').src = "../catimages/" + string;	
}
isNS4 = (document.layers) ? true : false;
isIE4 = (document.all && !document.getElementById) ? true : false;
isIE5 = (document.all && document.getElementById) ? true : false;
isNS6 = (!document.all && document.getElementById) ? true : false;

function switchDiv(strDivName,bolVisible){

 //identify the element based on browser type
 if (isNS4) {
   objElement = document.layers[strDivName];
 } else if (isIE4) {
   objElement = document.all[strDivName];
 } else if (isIE5 || isNS6) {
   objElement = document.getElementById(strDivName);
 }
 
 if(isNS4){
     if(!bolVisible) {
       objElement.visibility ="hidden"
     } else {
       objElement.visibility ="visible"
     }     
 }else{
     if(!bolVisible) {
       objElement.style.visibility = "hidden";
     } else {
       objElement.style.visibility = "visible";
     }
 }
}


function removeall(checkboxId)
{
  
	var the_box = eval("window.document.itemForm." + checkboxId);
	for (var i=0;i<the_box.length;i++) 
	{
		the_box[i].checked=false;
  	}
  	the_box[0].checked=true;
}

function resetfirst(checkboxId)
{
  	var the_box = eval("window.document.itemForm." + checkboxId);
  	the_box[0].checked=false;
}

function collapse_all (n_index, n_depth) {
	var o_tree = TREES[n_index ? n_index : 0];
	if (!n_depth) n_depth = 1;
	if (!o_tree)
		alert("Tree is not initialized yet");
	var a_nodes = o_tree.a_nodes;
	for (var i = a_nodes.length - 1; i >= 0; i--)
		if (a_nodes[i].n_depth >= n_depth && a_nodes[i].open)
			a_nodes[i].open(1, 1);
	o_tree.ndom_refresh();
}
function expand_all (n_index, n_depth) {
	var o_tree = TREES[n_index ? n_index : 0];
	if (!o_tree)
		alert("Tree is not initialized yet");
	var a_nodes = o_tree.a_nodes;
	for (var i = 0; i< a_nodes.length; i++)
		if (n_depth == null || a_nodes[i].n_depth <= n_depth)
			a_nodes[i].open(0, 1);
	o_tree.ndom_refresh();
}








	function openPopUp(url,target,attributes) 

	{

		popup = window.open(url,target,attributes);

		popup.moveTo((window.screen.availWidth -  640) / 2, (window.screen.availHeight - 480) / 2);//c

								}



function expandingWindow(website) {

var windowprops='width=100,height=100,scrollbars=yes,status=yes,resizable=yes'

var heightspeed = 2; // vertical scrolling speed (higher = slower)

var widthspeed = 7;  // horizontal scrolling speed (higher = slower)

var leftdist = 10;    // distance to left edge of window

var topdist = 10;     // distance to top edge of window



if (window.resizeTo&&navigator.userAgent.indexOf("Opera")==-1) {

var winwidth = window.screen.availWidth - leftdist;

var winheight = window.screen.availHeight - topdist;

var sizer = window.open("","","left=" + leftdist + ",top=" + topdist +","+ windowprops);

for (sizeheight = 1; sizeheight < winheight; sizeheight += heightspeed)

sizer.resizeTo("1", sizeheight);

for (sizewidth = 1; sizewidth < winwidth; sizewidth += widthspeed)

sizer.resizeTo(sizewidth, sizeheight);

sizer.location = website;

}

else

window.open(website,'mywindow');

}


///


var expDays = 1; // number of days the cookie should last
var page = "http://www.elinkuri.com";
var windowprops = "width=1024, height=768, top=100, left=100, menubar=1, scrollbars=1, location=1, toolbar=1,  resizable=1, status=1";
function GetCookie (name) {  
var arg = name + "=";  
var alen = arg.length;  
var clen = document.cookie.length;  
var i = 0;  
while (i < clen) {    
var j = i + alen;    
if (document.cookie.substring(i, j) == arg)      
return getCookieVal (j);    
i = document.cookie.indexOf(" ", i) + 1;    
if (i == 0) break;   
}  
return null;
}
function SetCookie (name, value) {  
var argv = SetCookie.arguments;  
var argc = SetCookie.arguments.length;  
var expires = (argc > 2) ? argv[2] : null;  
var path = (argc > 3) ? argv[3] : null;  
var domain = (argc > 4) ? argv[4] : null;  
var secure = (argc > 5) ? argv[5] : false;  
document.cookie = name + "=" + escape (value) + 
((expires == null) ? "" : ("; expires=" + expires.toGMTString())) + 
((path == null) ? "" : ("; path=" + path)) +  
((domain == null) ? "" : ("; domain=" + domain)) +    
((secure == true) ? "; secure" : "");
}
function DeleteCookie (name) {  
var exp = new Date();  
exp.setTime (exp.getTime() - 1);  
var cval = GetCookie (name);  
document.cookie = name + "=" + cval + "; expires=" + exp.toGMTString();
}
var exp = new Date(); 
exp.setTime(exp.getTime() + (expDays*24*60*60*1000));
function amt(){
var count = GetCookie('count')
if(count == null) {
SetCookie('count','1')
return 1
}
else {
var newcount = parseInt(count) + 1;
DeleteCookie('count')
SetCookie('count',newcount,exp)
return count
   }
}
function getCookieVal(offset) {
var endstr = document.cookie.indexOf (";", offset);
if (endstr == -1)
endstr = document.cookie.length;
return unescape(document.cookie.substring(offset, endstr));
}
function checkCount() {
var count = GetCookie('count');
if (count == null) {
count=1;
SetCookie('count', count, exp);
window.open(page, "", windowprops);
}
else {
count++;
SetCookie('count', count, exp);
   }
}



	
