window.addEvent('domready',function(){
	//SAMPLE 2 (transition: Bounce.easeOut)
	var nS2 = new noobSlide({
		box: $('box2'),
		items: [0,1],
		interval: 6500,
		size: 280,
		autoPlay: true,
		fxOptions: {
			duration: 1000,
			transition: Fx.Transitions.Bounce.easeOut,
			wait: false
		},
		addButtons: {
			previous: $('prev1'),
			play: $('play1'),
			stop: $('stop1'),
			next: $('next1')
		}
	});
	
	//SAMPLE 5 (mode: vertical, using "onWalk" )
	var nS5 = new noobSlide({
		mode: 'vertical',
		box: $('box5'),
		size: 330,
		autoPlay: true,
		items: [0,1],
		addButtons: {
			previous: $('prev5'),
			play: $('play5'),
			stop: $('stop5'),
			next: $('next5')
		}
	});
	if($('newsticker'))
	var myTicker = new mooTicker($(document.body).getElement('.newsticker'),{interval:3000});
	if($('advticker'))
	var advTicker = new mooTicker($(document.body).getElement('.advticker'),{groupBy:6,interval:8000});
});

function PrintArea(idArea,fileTarget){
	var winpopup=window.open(fileTarget,'winpopup','height=500,width=100%,resizable,scrollbars')
	winpopup.document.write(document.getElementById(idArea).innerHTML);
	winpopup.document.close();
	winpopup.print()
	winpopup.close()
}

function PrintArea2(idArea,fileTarget){
	var winpopup=window.open(fileTarget,'winpopup','height=500,width=620,resizable,scrollbars')
	winpopup.document.write(document.getElementById(idArea).innerHTML);
	winpopup.document.close();
	winpopup.print()
	winpopup.close()
}

function viewhadiah(idArea,fileTarget){
	var winpopup=window.open(fileTarget,'winpopup','height=500,width=700,resizable,scrollbars')
	winpopup.document.write(document.getElementById(idArea).innerHTML);
	winpopup.document.close();
	winpopup.close()
}


function PrintCoupon(obj,fileTarget){
	var winpopup=window.open(fileTarget,'winpopup','height=500,width=700,resizable,scrollbars')
	winpopup.document.write("<img src='"+obj+"' alt='diskon' />");
	winpopup.document.close();
	winpopup.print()
	winpopup.close()
}

function ShowImage(obj,fileTarget){
	var winpopup=window.open(fileTarget,'winpopup','height=500,width=700,resizable,scrollbars')
	winpopup.document.write("<img src='"+obj.src+"' alt='diskon' />");
	winpopup.document.close();
}

function ShowMap(obj,fileTarget){
	var winpopup=window.open(fileTarget,'winpopup','height=400,width=440,resizable,scrollbars')
	//winpopup.document.write(obj.title);
	//winpopup.document.close();
}

function sendQuiz(aForm,target){
	var params = '';
	for(i = 0; i < aForm.length; i++){
		if (params.length) params += '&';
		params += aForm.elements[i].name + '=' + encodeURI(aForm.elements[i].value);
	}
	ajaxRequestMethod('sendQuiz.php?'+params,target,'','GET');
}