/*--------------------------------------------------------------------------*/

function getContent(url,div,para) {
	where = div;
	google_page = url;

	if(div=="main"){
    location.hash = google_page;
//    window.location.href = window.location.protocol + "//" + window.location.host + window.location.pathname + window.location.search + "#" + url;
	} // END IF DIV = MAIN

	var rand = Math.random(9999);
	var pars = '?rand=' + rand + '&' + para;
	url = 'us_' + url + '.php';
	new Ajax.Request('/' + url, {method: 'get', parameters: pars, onLoading: showLoad, onComplete: showResponse} );
}

function showLoad () {
	$('load').style.display = 'block';
}

function showResponse (originalRequest) {
	$('load').style.display = 'none';
	$(where + '_div').innerHTML = originalRequest.responseText;

	document.title = google_page + ' from SAN.DRINE french electronica music';

if(!GetCookie('admin')) {
	_gaq.push(['_setAccount', 'UA-494031-5']);
	_gaq.push(['_trackPageview', '/' + google_page + '/get']);
}

}

/*--------------------------------------------------------------------------*/
 
function init(id,para) {

google_page = id;

	if((location.hash)&&(location.hash.length>2)) {
		getContent(location.hash.substring(1),'main',para);
	}else{
		document.title = google_page + ' from SAN.DRINE french electronica music';

if(!GetCookie('admin')) {
		_gaq.push(['_setAccount', 'UA-494031-5']);
		_gaq.push(['_trackPageview', '/' + google_page + '/ini']);
}

	}
}

/*--------------------------------------------------------------------------*/

  function get_object(id) {
   var object = null;
   if( document.layers ) {   
    object = document.layers[id];
   } else if( document.getElementById ) {
    object = document.getElementById(id);
   } else if( document.all ) {
    object = document.all[id];
   }
   return object;
  }

/*--------------------------------------------------------------------------*/

function view_cart() {

   if(document.all){
      availW = document.body.clientWidth;
      availH = document.body.clientHeight;
   }else{
      availW = innerWidth;
      availH = innerHeight;
   }

if(!GetCookie('admin')) {
	_gaq.push(['_setAccount', 'UA-494031-5']);
	_gaq.push(['_trackPageview', '/viewcart']);
}
   
   viewcart = window.open ("https://www.paypal.com/cgi-bin/webscr?cmd=_cart&business=TheDmMusic@aol.com&display=1&image_url=https%3A%2F%2Fccgpyg.bay.livefilestore.com%2Fy1pNj34_O0Gj2-A_EaThzKKAe8JGs_uEIMFE6CRB-dE98tkkJBWxj_pG4H5AHVU1WZTZ8f7zKLVei3op_pz313AVQ%2Fpplogo_a.gif", "cart", "width=1000px,height=420px,top=50,left=" + ((availW-800)/2) + ",status=0,toolbar=0,location=0,menubar=0,directories=0,resizable=0,scrollbars=1");

}

/*--------------------------------------------------------------------------*/

function add_to_cart(pp_id,n0,s0,n1,s1,n2,s2,n3,s3,n4,s4) {

   if(document.all){
      availW = document.body.clientWidth;
      availH = document.body.clientHeight;
   }else{
      availW = innerWidth;
      availH = innerHeight;
   }

 if(!GetCookie('admin')) {
	_gaq.push(['_setAccount', 'UA-494031-5']);
	_gaq.push(['_trackPageview', '/add2cart/' + pp_id]);
}
   
   addtocart = window.open ("https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=" + pp_id + "&on0=" + n0 + "&os0=" + s0 + "&on1=" + n1 + "&os1=" + s1 + "&on2=" + n2 + "&os2=" + s2 + "&rm=2&cy_code=USD&image_url=https%3A%2F%2Fccgpyg.bay.livefilestore.com%2Fy1pNj34_O0Gj2-A_EaThzKKAe8JGs_uEIMFE6CRB-dE98tkkJBWxj_pG4H5AHVU1WZTZ8f7zKLVei3op_pz313AVQ%2Fpplogo_a.gif", "cart", "width=1000px,height=420px,top=50,left=" + ((availW-800)/2) + ",status=0,toolbar=0,location=0,menubar=0,directories=0,resizable=0,scrollbars=1");

// + "&on3=" + n3 + "&os3=" + s3  + "&on4=" + n4 + "&os4=" + s4

}

/*--------------------------------------------------------------------------*/

function goto(y) {

divscroll.contentWindow.scrollTo(0, y);

}

/*--------------------------------------------------------------------------*/
