function init() {
	updateExternalLinks();
}

function Ouvrir_Spplus(url){
	var PopupSpplus_largeur	= 750;
	var PopupSpplus_hauteur	= 560;
	var PopupSpplus_top	=((screen.height-PopupSpplus_hauteur)/2);
	var PopupSpplus_left	=((screen.width-PopupSpplus_largeur)/2);

	var win = window.open(url, "SPPLUS","status=yes,top="+PopupSpplus_top+",left="+PopupSpplus_left+",width="+PopupSpplus_largeur+",height="+PopupSpplus_hauteur);
	win.focus();
}

function popuprnp(){
	var win2 = window.open('http://www.receiveandpay.com/wallet/customer/popup3x.php?logo=8110','popuprnp','height=600,width=616,status=yes,scrolbars=yes,menubar=no,resizable=yes');
}

function delSQuery(){
	document.getElementById('search_query').value='';
}

function closeCartValidate(){
	document.getElementById('cart_validate').style.display='none';
}

function updateExternalLinks() {
	if (!document.getElementsByTagName) return;
	var anchors = document.getElementsByTagName("a");
	for (var i=0; i<anchors.length; i++) {
		var anchor = anchors[i];
		//open external liks in a new browser window
		if (anchor.getAttribute("href") && anchor.getAttribute("rel") == "external")
			anchor.target = "_blank";
		//open popup liks in a new browser window
		if (anchor.getAttribute("href") && anchor.getAttribute("rel") == "popup")
			anchor.href='javascript:void(0);';
	}
}
/**
* PRODUCT TABS
**/
function generateTabs(){
	$tabs =document.getElementsByClassName(Array("tab_on","tab_off"),document.getElementById('product_tabs'));
	for(var i=0; i<$tabs.length; i++){
		$tabs[i].onclick=switchTab;
		if($tabs[i].className=="tab_on"){ JS_current_tab_on=$tabs[i].id;}
	}
}

function switchTab(){
	$id = this.id;
	if($id==JS_current_tab_on) return;
	document.getElementById(JS_current_tab_on+'_content').style.display='none';
	document.getElementById(JS_current_tab_on).className='tab_off';
	document.getElementById($id+'_content').style.display='';
	document.getElementById($id).className='tab_on';
	JS_current_tab_on=$id;
}

function RNPPay(type){
	document.getElementById('RNPTypeIHM').value=type;
	document.getElementById('rnp').submit();
}

document.getElementsByClassName = function(classNames, parentElement) {
	var children = parentElement.getElementsByTagName('*');
	var result = Array();
	for(var i=0; i < children.length; i++) {
		if(children[i].className==classNames[0] || children[i].className==classNames[1]) result.push(children[i]);
	}
	return result;
}

self.name="numeridogcom";
JS_current_tab_on=0;
window.onload = init;