function getParameter(str, name)
{
  var res = "";
  if (str.indexOf("?")!=-1)
  {
    str = str.substring(str.indexOf("?")+1, str.length);
    if (str.indexOf(name)!=-1)
    {
      if (str.indexOf("&", str.indexOf(name)+name.length)!=-1)
        res = str.substring(str.indexOf(name)+name.length+1, str.indexOf("&"))
	  else
        res = str.substring(str.indexOf(name)+name.length+1, str.length);
	}
  }
  return res;
}

function showBig(imageName, windowName, width, height)
{
  win = window.open("big.htm?path="+imageName,windowName,"width="+Number(width+30)+",height="+Number(height+60)+",left=17,top=17,statusbar=no,toolbar=no,scrollbars= never,navbar=no");
  win.focus();
}


// PopUp Script for small to pop-up bigger images...

function bigImage(source,width,height){ //width,height are the one of the image not for the popup   //source=just the image name
var logo_h=100; //the feight for the logo
var popup_w=width , popup_h=height+logo_h;
var adresa="big_image.html?img="+source;
var l=(screen.availWidth-popup_w)/2 , t=(screen.availHeight-popup_h)/2;
win=window.open(adresa,"LargeImage","width="+popup_w+",height="+popup_h+",left="+l+",top="+t+",statusbar=no,toolbar=no,scrollbars=no,navbar=no");
win.focus();
}

function bigImage2(source,width,height){ //width,height are the one of the image not for the popup   //source=just the image name
var logo_h=100; //the feight for the logo
var popup_w=width , popup_h=height+logo_h;
var adresa="big_image2.html?img="+source;
var l=(screen.availWidth-popup_w)/2 , t=(screen.availHeight-popup_h)/2;
win=window.open(adresa,"LargeImage","width="+popup_w+",height="+popup_h+",left="+l+",top="+t+",statusbar=no,toolbar=no,scrollbars=no,navbar=no");
win.focus();
}


// PopUp Script for NEWSLETTER...

function subscribeHere(){ 
var popup_w=380 , popup_h=300;
var adresa="subscribe.htm";
var l=(screen.availWidth-popup_w)/2 , t=(screen.availHeight-popup_h)/2;
win=window.open(adresa,"_blank","width="+popup_w+",height="+popup_h+",left="+l+",top="+t+",statusbar=no,toolbar=no,scrollbars=no,navbar=no");
win.focus();
}


//srcolling
var ind4=0;
var lungimeText4=665;
var viteza1=1;

function animPrez4()
{if(!document.layers){
if (ind4>lungimeText4) {ind4=0; top.scrollBox4.scrollTo(0,0);}
ind4+=viteza1;
top.scrollBox4.scrollBy(viteza1,0);
timerst4=setTimeout('animPrez4()',30);
}}

var timerup4;
var timerup4;

function PScrUp4()
{if(!document.layers){
if (window.timerst4) clearTimeout(timerst4);
if (ind4<lungimeText4) {top.scrollBox4.scrollBy(viteza1*30,0);
ind4+=viteza1*30;
timerup4=setTimeout("PScrUp4()",100);}
}}

function PScrStop4()
{if(!document.layers){
if (window.timerst4) clearTimeout(timerst4);
if (window.timerup4) clearTimeout(timerup4);
if (window.timerdn4) clearTimeout(timerdn4);
}}


function paypal(){
var adresa="paypal.htm";
var w=600 , h=520;
var l=(screen.availWidth-w)/2 , t=(screen.availHeight-h)/2;
win=window.open(adresa,"_blank","width="+w+",height="+h+",left="+l+",top="+t+",statusbar=no,toolbar=no,scrollbars=no,navbar=no");
win.focus();
}



function bigImg(img,w,h)
{
winIB=window.open("big_img.htm?img=" + img,"winIB","width="+w+",height="+h+",statusbar=1,toolbar=1,scrollbars=1,rezizable=1");
winIB.focus();
}
