

function getQueryVariable(variable) 
{ 
var query = window.location.search.substring(1); 
var vars = query.split("&"); 
for (var i=0;i<vars.length;i++) 
{ 
var pair = vars[i].split("="); 
if (pair[0] == variable) 
{ 
return pair[1]; 
} 
} 
}





var tabvalue = getQueryVariable("detail"); 
if(tabvalue != "")
{

val ='details_'+tabvalue+',details_show_'+tabvalue+',details_hide_'+tabvalue;
go_to_me = 'details_hide_'+tabvalue;
//alert(val);
//window.onload=setTimeout("toggle_id(val);document.getElementById(go_to_me).scrollIntoView(true);",10)
	
	}




function revealConcertDetail(id){

//alert(id);

idToggleList ='details_'+id+',details_show_'+id+',details_hide_'+id;
idScroll = 'details_hide_'+id;

toggle_id(idToggleList);
document.getElementById(idScroll).scrollIntoView(true);
// ------------------------ end func	
}









function Left(str, n){
	if (n <= 0)
	    return "";
	else if (n > String(str).length)
	    return str;
	else
	    return String(str).substring(0,n);
}
function ruLink() 
{
var sPath = window.location.pathname;
var sPage = sPath.substring(sPath.lastIndexOf('/') + 1);
if (sPage == "")
{sPage =  "index.html";}
if (Left(sPage, 3) == "ru_")
{nuPage =  sPage;}
else
{nuPage =  "ru_" + sPage;}
window.location = nuPage;
}
function engLink() 
{
var sPath = window.location.pathname;
var sPage = sPath.substring(sPath.lastIndexOf('/') + 1);
if (Left(sPage, 3) == "ru_")
{nuPage = sPage.replace("ru_", "");}
else
{nuPage =  sPage;}
window.location = nuPage;
}

function toggle_id(vLIST) {
			
			//alert('|'+vLIST+'|');
			var go_to = "";
			
			var vARR = vLIST.split(",");
					var arLen=vARR.length;
			for ( var i=0, len=arLen; i<len; ++i ){
			
			if (document.getElementById(vARR[i]).style.display == "none") 
			{document.getElementById(vARR[i]).style.display = "";
			//alert(vARR[i]);
			//////////////////
			if (vARR[i].substring(0,12) == 'details_hide') 
			{//document.getElementById(vARR[i]).scrollIntoView(true);
			go_to = vARR[i];}
			
			//////////////////
			}
			else
			{document.getElementById(vARR[i]).style.display = "none";}
			
			}

if (go_to == "")
{//scroll(0,0);
}
else
{
	//document.getElementById(go_to).scrollIntoView(true);
	}


//////end function
}



function contact_clear_form() {
			
			//alert('pp');
			//document.comments.submit();
			//for(i=0; i<document.comments.elements.length; i++)
//{
document.comments.Name.value = "";
document.comments.Profession.value = "";
document.comments.do_not_think_about_spam.value = "";
document.comments.textfield.value = "";
//}
			
		
///////////////////////////////////////////////////////////////////////////////////////////////////////////end function
}



function echeck(str) {

		var at="@"
		var dot="."
		var lat=str.indexOf(at)
		var lstr=str.length
		var ldot=str.indexOf(dot)
		if (str.indexOf(at)==-1){
		   alert("Invalid Email!")
		   return false
		}

		if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr){
		   alert("Invalid Email!")
		   return false
		}

		if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr){
		    alert("Invalid Email!")
		    return false
		}

		 if (str.indexOf(at,(lat+1))!=-1){
		    alert("Invalid Email!")
		    return false
		 }

		 if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot){
		    alert("Invalid Email!")
		    return false
		 }

		 if (str.indexOf(dot,(lat+2))==-1){
		    alert("Invalid Email!")
		    return false
		 }
		
		 if (str.indexOf(" ")!=-1){
		    alert("Invalid Email!")
		    return false
		 }

 		 return true					
	}
///////////////////////////////////////////////////////////////////////////////////////////////////////////end function



function contact_validate_form(){
	
	//alert('test');
	
	var emailID=document.comments.do_not_think_about_spam
	
	if ((emailID.value==null)||(emailID.value=="")){
		alert("Please Enter Your Email!")
		emailID.focus()
		return false
	}
	if (echeck(emailID.value)==false){
		//emailID.value="";
		emailID.focus()
		return false
	}

	if ((document.comments.textfield.value==null)||(document.comments.textfield.value=="")){
		alert("No Message Entered!")
		document.comments.textfield.focus()
		return false
	}



return true

///////////////////////////////////////////////////////////////////////////////////////////////////////////end function
 }
 
 


function contact_click_submit() {
	var b=document.getElementById('comments').onsubmit();
    if (b) {
        
		document.getElementById('comments').submit();
    }
///////////////////////////////////////////////////////////////////////////////////////////////////////////end function
}



function contact_direct(id_contact,id_p) {
			
//alert(document.comments.contact_id.value);

document.comments.contact_id.value = id_contact;

				for ( var i=0, len=4; i<len; ++i )
				{
				document.getElementById('contact_direct'+i).style.display = "none";
				}

document.getElementById(id_p).style.display = "";

//alert(document.comments.contact_id.value);
///////////////////////////////////////////////////////////////////////////////////////////////////////////end function
}


//window.onload = function go_to_reveal() {
function go_to_reveal() {
//
hu = window.location.search.substring(1);

gy = hu.split("&");

for (i=0;i<gy.length;i++) {
			ft = gy[i].split("=");
			
			if (ft[0] == 'detail') 
			{
				
			toggle_id('details_'+ft[1]+',details_show_'+ft[1]+',details_hide_'+ft[1]);
			document.getElementById('details_hide_'+ft[1]).scrollIntoView(true);
			}
}

///////////////////////////////////////////////////////////////////////////////////////////////////////////end function
}



function email_join_validate_form(){
	
	//alert('test');
	
	//return false;
	
	var emailID=document.join_email.do_not_think_about_spam;
	
	if ((emailID.value==null)||(emailID.value=="")){
		alert("Please Enter your Email!");
		emailID.focus();
		return false;
	}
	if (echeck(emailID.value)==false){
		
		emailID.focus();
		return false;
	}

	



return true;

///////////////////////////////////////////////////////////////////////////////////////////////////////////end function
 }

