function OpenP(page) {
	b = "win_" + String(Math.round(Math.random() * 1000000));
	OpenWin = window.open(page, b, "toolbar=no,menubar=yes,location=no,scrollbars=yes,resizable=yes,width=350,height=600,top=10,left=10");
	return true;
}

function Start(page) {
	b = "win_" + String(Math.round(Math.random() * 1000000));
	OpenWin = window.open(page, b, "toolbar=no,menubar=yes,location=no,directories=no, status=no,scrollbars=yes,resizable=yes,width=780,height=600,top=10,left=10");
	return true;
}

function StartSong(xsong) {
	b = "win_" + String(Math.round(Math.random() * 1000000));
	var page="song.asp?song="+xsong
	OpenWin = window.open(page, b, "toolbar=no,menubar=no,location=no,directories=no, status=no,scrollbars=no,resizable=no,width=147,height=117,top=10,left=10");
	return true;
}

function StartGallery(page) {
	b = "win_" + String(Math.round(Math.random() * 1000000));
	OpenWin =window.open(page, b, "toolbar=no,menubar=yes,location=no,directories=no, status=no,scrollbars=yes,resizable=yes,width=900,height=650,top=10,left=10");
	return true;
}
function StartPicture(page) {
	b = "win_" + String(Math.round(Math.random() * 1000000));
	OpenWin =window.open(page, b, "toolbar=no,menubar=yes,location=no,directories=no, status=no,scrollbars=yes,resizable=yes,width=600,height=500,top=10,left=10");
	return true;
}
function StartPictures(page) {
	b = "win_" + String(Math.round(Math.random() * 1000000));
	OpenWin =window.open(page, b, "toolbar=no,menubar=yes,location=no,directories=no, status=no,scrollbars=yes,resizable=yes,width=760,height=600,top=10,left=10");
	return true;
}
function OpenRadio(page) {
	b = "win_" + String(Math.round(Math.random() * 1000000));
	OpenWin = window.open(page, b, "toolbar=no,menubar=no,location=no,scrollbars=yes,resizable=yes,width=365,height=520,top=10,left=10");
	return true;
}

function OpenBI(page) {
	b = "win_" + String(Math.round(Math.random() * 1000000));
	OpenWin = window.open(page, b, "toolbar=no,menubar=yes,location=no,scrollbars=yes,resizable=yes,width=550,height=640,top=10,left=10");
	return true;
}

function Play(musicsrc) {
PopUp = StartSong(page) 
}

/*
Background music script
By JavaScript Kit (http://javascriptkit.com)
Over 400+ free scripts here!
*/

function PlaySong(musicsrc) {

	if (navigator.appName=="Microsoft Internet Explorer")
	document.write('<bgsound src='+'"'+musicsrc+'"'+' loop="1" autostart=true></bgsound>')
	else 
	document.write('<embed src=\"'+musicsrc+'\" hidden="true" border="0" width="20" height="20" autostart="true" loop="true" MASTERSOUND><.embed >')
}
//-->

 //________________________________________________________________________________________________
//_____________________      goSection     _____________________________________________________________

function goSection(SSID,SectionID)
{
		document.myform.SSID.value = SSID;
		document.myform.SectionID.value = SectionID;
		document.myform.action = "IndexSections.asp";
//		alert(document.myform.SectionID.value);
		document.myform.submit();
}

 //________________________________________________________________________________________________
//_____________________      goSectionT     _____________________________________________________________

function goSectionT(SSID,SectionID)
{
		document.myform.SSID.value = SSID;
		document.myform.SectionID.value = SectionID;
		document.myform.action = "IndexSectionsT.asp";
//		alert(document.myform.SectionID.value);
		document.myform.submit();
}


 //________________________________________________________________________________________________
//_____________________      goSectionl     _____________________________________________________________

function goSectionL(SSID,SectionID)
{
		document.myformL.SSID.value = SSID;
		document.myformL.SectionID.value = SectionID;
		document.myformL.action = "IndexSections.asp";
		document.myformL.submit();
}

//________________________________________________________________________________________________
//_____________________      goSubmM     _____________________________________________________________

function goSubmM(url,page,groupCrt,sSortBy,sSortOrd){
		document.myform1.page.value = page;
		document.myform1.sCMD.value = "";
		document.myform1.groupCrt.value = groupCrt;
		document.myform1.SortBy.value = sSortBy;
		document.myform1.SortOrd.value = sSortOrd;
		document.myform1.action = url;
		document.myform1.submit();
}

//________________________________________________________________________________________________
//_____________________      goSubmM     _____________________________________________________________

function goSubmMy(page,groupCrt,ID){
		document.myform.page.value = page;
		document.myform.sCMD.value = "";
		document.myform.groupCrt.value = groupCrt;
		document.myform.ID.value = ID;
		document.myform.submit();
}



//____________________________________________________________________________________
//_____________     ValidSEmail      ________________________________________________

function ValidSEmail() {
	if (isWhitespace(document.frmEmail.comments.value)) 
	{
	     alert("Completati Masajul! ");
	     document.frmEmail.comments.focus();
	     return false;
	}  
	 return true;
}


//____________________________________________________________________________________
//_____________     ValidSearch      ________________________________________________

function ValidSearch() {

	if (isWhitespace(document.myformArh.KeySearch.value)) 
	{
	
		if (isWhitespace(document.myformArh.an.value)) 
		{
			alert("Selectati anul! ");
			document.myformArh.an.focus();
			return false;
		}  
		if (isWhitespace(document.myformArh.ln.value)) 
		{
			alert("Selectati luna! ");
			document.myformArh.ln.focus();
			return false;
		}  
	}  
		
	 return true;
}

//________________________________________________________________________________________________
//_____________________      goSite     _____________________________________________________________

function goSite(cod1,cod2,an,ln)
{
		document.myformArh.cod1.value = cod1;
		document.myformArh.cod2.value = cod2;
		document.myformArh.an.value = an;
		document.myformArh.ln.value = ln;
		document.myformArh.action = "SiteMapDetail.asp";
		document.myformArh.submit();
}

//________________________________________________________________________________________________
//_____________________      goArhiva     _____________________________________________________________

function goArhiva(an,ln)
{
		document.myformArh.an.value = an;
		document.myformArh.ln.value = ln;
		document.myformArh.action = "Arhiva.asp";
		document.myformArh.submit();
}

//____________________________________________________________________________________
//_____________     isWhitespace      ________________________________________________

// Check whether string s is empty.
function isEmpty(s)
{   return ((s == null) || (s.length == 0))
}

// Returns true if string s is empty or 
// whitespace characters only.

function isWhitespace (s)

{   // Is s empty?
//    return (isEmpty(s));
    return (isEmpty(s) || reWhitespace.test(s));
}

function ranmidi() {
var x="http://gid-romania.com/mp3/Colinde/FlorinSasarman_MosCraciunBlajinsiDarnic.mp3"
 return (x)
}


function Yranmidi() {
var x=Math.round(Math.random()*5)
if (x==0) x="http://gid-romania.com/mp3/Colinde/FlorinSasarman_MosCraciunBlajinsiDarnic.mp3"
else if (x==1) x="http://gid-romania.com/mp3/Colinde/Georgiana&Diana-Cine-sede-n-asta-casa.mp3"
else if (x==2) x="http://gid-romania.com/mp3/Colinde/Georgiana&Diana-Coborat-o,coborat.mp3"
else if (x==3) x= "http://gid-romania.com/mp3/Colinde/Georgiana&Diana-La-toate-casele-i-zare.mp3"
else if (x==4) x= "http://gid-romania.com/mp3/Colinde/Georgiana&Diana-Copilule,cu-ochi-senini.mp3"
else if (x==5) x= "http://gid-romania.com/mp3/Colinde/Georgiana&Diana-Sa-sadim-in-iast-gradina.mp3"
else if (x==6) x= "http://gid-romania.com/mp3/Colinde/Georgiana&Diana-Sculati,sculati,boieri-mari!.mp3"
else if (x==7) x= "http://gid-romania.com/mp3/Colinde/Georgiana&Diana-Sosit-o-praznicu-iara.mp3"
else if (x==8) x= "http://gid-romania.com/mp3/Colinde/Georgiana&Diana-Colo-n-sus,la-rasarit.mp3"
else x="http://gid-romania.com/mp3/Colinde/Georgiana&Diana-Veseleste-te,crestine!.mp3"
 return (x)
}

function ranmidi_loc() {
var x=Math.round(Math.random()*5)
if (x==0) x="http://localhost/gid/mp3/Colinde/Georgiana&Diana-Colo-sus,in-vremea-aceea.mp3"
else if (x==1) x="http://localhost/gid/mp3/Colinde/Georgiana&Diana-Cine-sede-n-asta-casa.mp3"
else if (x==2) x="http://localhost/gid/mp3/Colinde/Georgiana&Diana-Coborat-o,coborat.mp3"
else if (x==3) x= "http://localhost/gid/mp3/Colinde/Georgiana&Diana-La-toate-casele-i-zare.mp3"
else if (x==4) x= "http://localhost/gid/mp3/Colinde/Georgiana&Diana-Copilule,cu-ochi-senini.mp3"
else if (x==5) x= "http://localhost/gid/mp3/Colinde/Georgiana&Diana-Sa-sadim-in-iast-gradina.mp3"
else if (x==6) x= "http://localhost/gid/mp3/Colinde/Georgiana&Diana-Sculati,sculati,boieri-mari!.mp3"
else if (x==7) x= "http://localhost/gid/mp3/Colinde/Georgiana&Diana-Sosit-o-praznicu-iara.mp3"
else if (x==8) x= "http://localhost/gid/mp3/Colinde/Georgiana&Diana-Colo-n-sus,la-rasarit.mp3"
else x="http://localhost/gid/mp3/Colinde/Georgiana&Diana-Veseleste-te,crestine!.mp3"
 return (x)
}