<!--
var loc;
function issuer_changed(form)
{
	if(form.selectedIndex!=0 && navigator.appName != 'Netscape')
	{
		window.location = 'search_product.php?action=getissuergroup&id=' + form.value;
	}
}
function issuer_group_changed()
{
	document.forms[0].v_issuer.selectedIndex = 0;
}
function show(id) {
    if (document.getElementById && document.getElementById(id) != null) {
         document.getElementById(id).style.visibility='visible';
         document.getElementById(id).style.display='block';
    }
    else if (document.layers && document.layers[id] != null)
        document.layers[id].visibility = 'visible';
    else if (document.all) {
        document.all[id].style.zIndex = 100;
        document.all[id].style.visibility = 'visible';
    }
}
function hide(id) {
    if (document.getElementById && document.getElementById(id) != null) {
         document.getElementById(id).style.visibility='hidden';
         document.getElementById(id).style.display='none';
    }
    else if (document.layers && document.layers[id] != null)
        document.layers[id].visibility = 'hidden';
    else if (document.all)
         document.all[id].style.visibility = 'hidden';
}
if (document.getElementById) { document.write('<style>.article {position:absolute;visibility:hidden;display:none}</style>'); }

function popup(url,name,features)
{
	loc = window.open(url,name,features);
}
function waitandclose(url,time)
{		
 
   //specify redirect url
  
	 var redirecturl=url;
   //specify pause duration before redirection (in seconds)
   var pausefor=time
  
   //DONE EDITING
  
   function postaction(pausefor){
   if (window.timer){
   clearInterval(timer)
   clearInterval(timer_2)
   }
	 opener.location=redirecturl;	 
   }
   setTimeout("postaction()",pausefor*1000)  
}
function process()
{
	redirect = '';
	switch(document.forms[0].v_report.selectedIndex)
	{
		case 1:
			redirect = 'report1.php';
		break;
		case 2:
			redirect = 'report2.php';
		break;
		case 3:
			redirect = 'report3.php';
		break;
		case 4:
			redirect = 'report4.php';
		break;
		case 5:
			redirect = 'report5.php';
		break;
		case 6:
			redirect = 'report6.php';
		break;
		case 7:
			redirect = 'report7.php';
		break;
		case 8:
			redirect = 'report8.php';
		break;
		case 9:
			redirect = 'report9.php';
		break;
		case 10:
			redirect = 'report10.php';
		break;
		case 11:
			redirect = 'report12.php';
		break;
	}
	waitandclose(redirect,'5')
}
function closeIt()
{
	loc.close();
}

function publish(val)
{	
	window.location ='news_list.php?action=publish&id=' + val;
}
function unpublish(val)
{	
	window.location ='news_list.php?action=unpublish&id=' + val;
}
function confirmDeleteNews(val)
{
	if(confirm("Are you sure you want to delete this news?"))
	{
		window.location = "news_list.php?action=delete&id=" + val;
	}
}
function confirmDeleteIssuerGroup(val)
{
	if(confirm("Are you sure you want to delete this issuer group?"))
	{
		window.location = "issuer_group_list.php?action=delete&id=" + val;
	}
}
function confirmDeleteIssuer(val)
{
	if(confirm("Are you sure you want to delete this issuer?"))
	{
		window.location = "issuer_list_second_step.php?action=delete&id=" + val;
	}
}
function confirmDeleteUser(name,val,from,subaction,by,direction)
{
	if(confirm("Are you sure you want to delete the user " + name + "?"))
	{
		window.location = "user_list.php?action=delete&id=" + val + "&from=" + from + "&subaction=" + subaction + "&by=" + by + "&direction=" + direction;
	}
}
function confirmDeleteVoucher(name,val,from,subaction,by,direction)
{
	if(confirm("Are you sure you want to delete the voucher " + name + "?"))
	{
		window.location = "voucher_list.php?action=delete&id=" + val + "&from=" + from + "&subaction=" + subaction + "&by=" + by + "&direction=" + direction;
	}
}

function confirmDeleteWebsite(name,val,from,subaction,by,direction)
{
	if(confirm("Are you sure you want to delete the website " + name + "?"))
	{
		window.location = "website_list.php?action=delete&id=" + val + "&from=" + from + "&subaction=" + subaction + "&by=" + by + "&direction=" + direction;
	}
}

function IssuerGroupChange(truc)
{
	if(!truc.value==0)
	{
		str= "user_add.php?issuerID=" + truc.value;
		window.location = str;
	}
}
function IssuerGroupChangeEdit(truc)
{
	if(!truc.value==0)
	{
		str= "user_edit.php?issuerID=" + truc.value;
		window.location = str;
	}
}
function confirmDeleteProduct(val,val2)
{
	if(confirm("Are you sure you want to delete the product '" + val + "'?"))
	{
		window.location = "product_list_edit.php?action=delete&id=" + val2;
	}
}
function confirmUnconnectAll(url)
{
	if(confirm("Are you sure you want to unconnect all users?"))
	{
		window.location = url;
	}
}

function orderby(lol)
{
	switch(lol.selectedIndex)
	{
		case 0:
			window.location="user_list.php?subaction=sort&by=registereddate&direction=registrationdown";
		break;
		case 1:
			window.location="user_list.php?subaction=sort&by=name&direction=nameup";
		break;
		case 2:
			window.location="user_list.php?subaction=sort&by=name&direction=namedown";
		break;
		case 3:
			window.location="user_list.php?subaction=sort&by=lastaccessdate&direction=lastaccessdown";
		break;
		case 4:
			window.location="user_list.php?subaction=sort&by=accounttype";
		break;
	}
	
}

function currentoffersorderby(lol)
{
	switch(lol.selectedIndex)
	{
		case 0:
			window.location="current_offers.php?subaction=sort&by=closedate&direction=closedatedown";
		break;
		case 1:
			window.location="current_offers.php?subaction=sort&by=issuernameup";
		break;
		case 2:
			window.location="current_offers.php?subaction=sort&by=issuernamedown";
		break;		
	}
	
}

function trimissuer(lol)
{
	if(lol.value)
	{
		window.location ="user_list.php?subaction=search&issuerID=" + lol.value;
	}
}
function trimwrapper(lol)
{
	if(lol.value==0)
	{
		window.location ="current_offers.php";
	}
	else
	{
		window.location ="current_offers.php?subaction=search&wrapperID=" + lol.value;
	}
}

function makeItHappenWrapper(val1,val2,val3,val4)
{
	str = "products_list.php?wrapperID=" + document.sorthat.v_wrapper.value;
	str += "&orderby=" + val1;
	str += "&productTypeID=" + val3;
	str += "&sct=" + val4;
	window.location = str;
}
function makeItHappenOrder(val1,val2,val3,val4)
{
	str = "products_list.php?wrapperID=" + val2;
	str += "&orderby=" + document.sorthat.v_order.value;
	str += "&productTypeID=" + val3;
	str += "&sct=" + val4;
	window.location = str;
}
function makeItHappenProductType(val1,val2,val3,val4)
{
	str = "products_list.php?wrapperID=" + val2;
	str += "&orderby=" + val1;
	str += "&productTypeID=" + document.sorthat.v_product_type.value;
	str += "&sct=" + val4;
	window.location = str;
}

function makeItHappenWrapperIFAs(val1,val2,val3,val4,val5)
{
	str = "products_list.php?wrapperID=" + document.sorthat.v_wrapper.value;
	str += "&orderby=" + val1;
	str += "&productTypeID=" + val3;
	str += "&sct=" + val4;
	str += "&distributionID=" + val5;
	window.location = str;
}
function makeItHappenOrderIFAs(val1,val2,val3,val4,val5)
{
	str = "products_list.php?wrapperID=" + val2;
	str += "&orderby=" + document.sorthat.v_order.value;
	str += "&productTypeID=" + val3;
	str += "&sct=" + val4;
	str += "&distributionID=" + val5;
	window.location = str;
}
function makeItHappenProductTypeIFAs(val1,val2,val3,val4,val5)
{
	str = "products_list.php?wrapperID=" + val2;
	str += "&orderby=" + val1;
	str += "&productTypeID=" + document.sorthat.v_product_type.value;
	str += "&sct=" + val4;
	str += "&distributionID=" + val5;
	window.location = str;
}
function makeItHappenDistributionIFAs(val1,val2,val3,val4,val5)
{
	str = "products_list.php?wrapperID=" + val2;
	str += "&orderby=" + val1;
	str += "&productTypeID=" + val3;
	str += "&sct=" + val4;
	str += "&distributionID=" + document.sorthat.v_distribution_channel.value;
	window.location = str;
}

function confirmDeletePDF(url)
{
	if(confirm("Are you sure you want to delete the pdf related to this product?"))
	{
		window.location = url;
	}
}
function confirmDeleteFile(val,val2)
{
	if(confirm("Are you sure you want to delete the pdf '" + val2 + "'?"))
	{
		window.location = val;
	}
}
function confirmDeleteModule(val,val2)
{
	if(confirm("Are you sure you want to delete the module '" + val + "'?"))
	{
		window.location = val2;
	}
}

function confirmDeleteSection(val,val2)
{
	if(confirm("Are you sure you want to delete the section '" + val + "'?"))
	{
		window.location = val2;
	}
}

function confirmDeletePage(val,val2)
{
	if(confirm("Are you sure you want to delete the page '" + val + "'?"))
	{
		window.location = val2;
	}
}


function submit_it(val)
{
	if(val=='finish')
	{
		document.forms['portfolio_preview'].v_finish.value = 1;
	}
	document.forms['portfolio_preview'].submit();
}
<!-- Begin
function textCounter(field,cntfield,maxlimit) {
if (field.value.length > maxlimit) // if too long...trim it!
field.value = field.value.substring(0, maxlimit);
// otherwise, update 'characters left' counter
else
cntfield.value = maxlimit - field.value.length;
}
function NetworkChange(truc,val)
{
	if(!truc.value==0)
	{
		str= val + "&networkID=" + truc.value;
		window.location = str;
	}
}
function trimifacompany(lol)
{
	if(lol.value)
	{
		window.location ="user_list.php?subaction=search&ifa_companyID=" + lol.value;
	}
}




//  End -->



//-->
