
function ProductsInfo(pid,ss) {
  
  pb = document.getElementById("ContentAreaBox");
  
  pb.style.display = "block";
  
  document.getElementById("ContentAreaBoxTitle").innerHTML = "&nbsp;";        
  document.getElementById("ContentAreaBoxInner").innerHTML = "<img src='graphics/loader.gif' />";        
  
  if(ss == "p")
   GetProdsInfo(pid);
  else
   GetCompProds(pid);
  

} // end productsinfo function


 function GetProdsInfo(pid) {
    
	var doPagesContent = function(doPagesContentResponse) {
    var conts = doPagesContentResponse;
    conts_arr = new Array();
    conts_arr = conts.split("#**#");
        document.getElementById("ContentAreaBoxTitle").innerHTML = conts_arr[1];        
        document.getElementById("ContentAreaBoxInner").innerHTML = conts_arr[2];        
            	      
	} // end 
	
	oAjax.doPost('get_prod_info.php', 'v=' + pid, doPagesContent, 'text');

 } // end function

 function GetCompProds(pid) {
    
	var doPagesContent = function(doPagesContentResponse) {
    var conts = doPagesContentResponse;
    conts_arr = new Array();
    conts_arr = conts.split("#**#");
        document.getElementById("ContentAreaBoxTitle").innerHTML = conts_arr[1];        
        document.getElementById("ContentAreaBoxInner").innerHTML = conts_arr[2];        
            	      
	} // end 
	
	oAjax.doPost('get_comp_prods.php', 'v=' + pid, doPagesContent, 'text');

 } // end function



function CloseBox(v) {

document.getElementById(v).style.display = "none";

} // end closebox function

function ClearInputs() {

document.contact_us.name.value = "";
document.contact_us.email.value = "";
document.contact_us.msg.value = "";

} // end ClearInputs function

function ClearSelInput(i) {

  vO = document.getElementById(i);
  
  v = vO.value;
  
  if(v == "Name" || v == "Email" || v == "Message")
     vO.value = "";
  
} // end function


function ContactUs() {

 er = 0;
 re = "";
 
 nv = document.getElementById("name").value;
 
 if(Remove_Spaces(nv) == "" || nv == "Name") {
    er++;
    re += "Type your name\n";
 }
 
 nv = document.getElementById("email").value;

 if(Remove_Spaces(nv) == "" || nv == "Email") {
    er++;
    re += "Type your email\n";
 }
 
 nv = document.getElementById("msg").value;

 if(Remove_Spaces(nv) == "" || nv == "Message") {
    er++;
    re += "Type your message";
 }
 
 if(er == 0) {
    document.contact_us.submit()
 }
 else {
    alert(re)
 }

} // end function



