var whitespace = " \t\n\r";
var defaultEmptyOK = false;
var NS4 = (document.layers) ? true : false;

function isEmpty(s)
{   
	return ((s == null) || (s.length == 0))
}


function isWhitespace (s)

{   
	var i;

    if (isEmpty(s)) return true;

    for (i = 0; i < s.length; i++)
    {   
        var c = s.charAt(i);

        if (whitespace.indexOf(c) == -1) return false;
    }
    return true;
}

function isEmail (s)
{   if (isEmpty(s)) 
       if (isEmail.arguments.length == 1) return defaultEmptyOK;
       else return (isEmail.arguments[1] == true);

    if (isWhitespace(s)) return false;

    var i = 1;
    var sLength = s.length;

    while ((i < sLength) && (s.charAt(i) != "@"))
    { i++
    }

    if ((i >= sLength) || (s.charAt(i) != "@")) return false;
    else i += 2;

    while ((i < sLength) && (s.charAt(i) != "."))
    { i++
    }
	if ((i >= sLength - 1) || (s.charAt(i) != ".")) return false;
    else return true;
}

function isDigit (c)
{  
	return ((c >= "0") && (c <= "9"))
}

function isInteger (s)

{  
	var i;

    if (isEmpty(s)) 
       if (isInteger.arguments.length == 1) return defaultEmptyOK;
       else return (isInteger.arguments[1] == true);
    for (i = 0; i < s.length; i++)
    {   
        var c = s.charAt(i);

        if (!isDigit(c)) return false;
    }
    return true;
}

function goToPage(url)
{
	window.location.href=url;
}

function openPage(url)
{
	window.open(url,"_blank","width=700,height=600,scrollbars=1,resizable=1");
}

function DoSearch()
{
	SearchForm.submit();
}

function ClientFormact()
{
	if(ClientForm.txtFirstName.value == "")
	{
		alert("Please enter First Name.");
		ClientForm.txtFirstName.focus();
	}
	else if(ClientForm.txtLastName.value == "")
	{
		alert("Please enter Last Name.");
		ClientForm.txtLastName.focus();
	}
	else if(ClientForm.txtEmail.value == "")
	{
		alert("Please enter Correct email address.");
		ClientForm.txtEmail.focus();
	}
	else
		ClientForm.submit();
}

function PrintPage()
{
	window.open('PrintPage.asp','PrintPage','width=770,height=550,scrollbars=yes')
}

function showmenu(elmnt)
{
	var tat="tat"+elmnt;
	document.getElementById(tat).style.display="block";
	document.getElementById(elmnt).style.background="#142751";
	document.getElementById(tat).style.background="#142751";
}

function hidemenu(elmnt)
{
	var tat="tat"+elmnt;
	document.getElementById(elmnt).style.background="#064856"
	document.getElementById(tat).style.display="none";
	document.getElementById(tat).style.background="white";
}

function open_close_leket()
{
 if (document.getElementById('leket').style.display=="")
  document.getElementById('leket').style.display="none"
 else
   document.getElementById('leket').style.display="";
  
}

function open_close_ans(idd)
{
 
 if (eval('document.getElementById("'+idd+'").style.display==""'))
  eval('document.getElementById("'+idd+'").style.display="none"')
 else
   eval('document.getElementById("'+idd+'").style.display=""');
  
}

function ShowFullInfo(Str)
{
	window.open('FullArtistStatement.asp?id='+Str,'','width=550,height=550,scrollbars=yes')
}

function ShowMoreInfo(Str)
{
	window.open('PublishingMore.asp?id='+Str,'','width=550,height=550,scrollbars=yes')
}

function ShowPublishingFullInfo(Str)
{
	window.open('PublishingFullInfo.asp?id='+Str,'','width=550,height=550,scrollbars=yes')
}

function ShowFullInfoEng(Str)
{
	window.open('FullArtistStatement_eng.asp?id='+Str,'','width=550,height=550,scrollbars=yes')
}

function ShowMoreInfoEng(Str)
{
	window.open('PublishingMore_eng.asp?id='+Str,'','width=550,height=550,scrollbars=yes')
}

function ShowPublishingFullInfoEng(Str)
{
	window.open('PublishingFullInfo_eng.asp?id='+Str,'','width=550,height=550,scrollbars=yes')
}

function showmenu1(elmnt)
{
	document.getElementById(elmnt).style.visibility="visible"
}

function hidemenu1(elmnt)
{
	document.getElementById(elmnt).style.visibility="hidden"
}

function ShowTermsHe()
{
	window.open('Terms_h.asp','','width=550,height=550,scrollbars=yes')
}		

function ShowTermsEn()
{
	window.open('Terms_e.asp','','width=550,height=550,scrollbars=yes')
}		
