// JavaScript Document
function gotoParent(ur){
			parent.location.href=''+ur+'';
		}
function goInd(obVal, page){
	//alert(obVal);
	callContent(obVal, page, '');
	hideIbox();
}
function doIbox(url,title,params) {
var params = parseQuery(params);
showIbox(url,title,params);
showBG();
//alert(maintPos);
window.onscroll = maintPos;
window.onresize = maintPos;
}

// Functions for Admin section start...

function delCategory(id, rol){
		var url = 'cat.php';
		document.getElementById('proc').style.display = 'block';
		// notice the use of a proxy to circumvent the Same Origin Policy.
		new Ajax.Request(url, {
		  method: 'post',
		  parameters: 'type=delcate&id='+id,
		  onSuccess: function(transport) {
				alert(transport.responseText);
			  callCategories(0, rol);				
		  }
		});
		//document.getElementById('proc').style.display = 'none';
}
function actDeact(obVal, id, page, rol){
	switch (obVal){
		case 'pages':
			var url = 'manage_pages.php';
			document.getElementById('proc').style.display = 'block';
			// notice the use of a proxy to circumvent the Same Origin Policy.
			new Ajax.Request(url, {
		  	method: 'post',
		  	parameters: 'type=actdeact&id='+id,
		  	onSuccess: function(transport) {
				callContent(obVal, page, '');
				//alert(transport.responseText);
		  }
		});
			//document.getElementById('proc').style.display = 'none';
		break;
		
		case 'items':
			var url = 'manage_itemdetails.php';
			document.getElementById('proc').style.display = 'block';
			// notice the use of a proxy to circumvent the Same Origin Policy.
			new Ajax.Request(url, {
		  	method: 'post',
		  	parameters: 'type=actdeact&id='+id,
		  	onSuccess: function(transport) {
				callContent(obVal, page, '');
				//alert(transport.responseText);
		  }
		});
			//document.getElementById('proc').style.display = 'none';
		break;
		
		case 'detailsimg':
			var url = 'details_img.php';
			document.getElementById('proc').style.display = 'block';
			// notice the use of a proxy to circumvent the Same Origin Policy.
			new Ajax.Request(url, {
		  	method: 'post',
		  	parameters: 'type=actdeact&id='+id,
		  	onSuccess: function(transport) {
				detImg(page, rol);
				//alert(transport.responseText);
		  }
		});
			//document.getElementById('proc').style.display = 'none';
		break;
	}
}
function prodFeat(id, page, chbx){
		var url = 'prod.php';
		document.getElementById('proc').style.display = 'block';
		new Ajax.Request(url, {
		method: 'post',
		parameters: 'type=actFeat&id='+id,
		onSuccess: function(transport) {
			alert(transport.responseText);
			callContent('prod', page, '');
	  }
	});
}
function delAny(obVal, id, page, rol){
	switch (obVal){
		case 'img':
			var url = 'manage_pages.php';
			document.getElementById('proc').style.display = 'block';
			// notice the use of a proxy to circumvent the Same Origin Policy.
			new Ajax.Request(url, {
		  	method: 'post',
		  	parameters: 'type=delimg&id='+id,
		  	onSuccess: function(transport) {
				callContent(obVal, page, rol);
				//alert(transport.responseText);
		  }
		});
			//document.getElementById('proc').style.display = 'none';
		break;
		case 'trackcode':
			var url = 'manage_trackcodes.php';
			document.getElementById('proc').style.display = 'block';
			// notice the use of a proxy to circumvent the Same Origin Policy.
			new Ajax.Request(url, {
		  	method: 'post',
		  	parameters: 'type=delcode&id='+id,
		  	onSuccess: function(transport) {
				callContent(obVal, page, rol);
				//alert(transport.responseText);
		  }
		});
			//document.getElementById('proc').style.display = 'none';
		break;
		case 'image':
			var url = 'manage_pages.php';
			document.getElementById('proc').style.display = 'block';
			// notice the use of a proxy to circumvent the Same Origin Policy.
			new Ajax.Request(url, {
		  	method: 'post',
		  	parameters: 'type=delimg&id='+id,
		  	onSuccess: function(transport) {
				callContent(rol, '', rol);
				//alert(transport.responseText);
		  }
		});
			//document.getElementById('proc').style.display = 'none';
		break;
		case 'itemimage':
			var url = 'manage_itemdetails.php';
			document.getElementById('proc').style.display = 'block';
			// notice the use of a proxy to circumvent the Same Origin Policy.
			new Ajax.Request(url, {
		  	method: 'post',
		  	parameters: 'type=delimg&id='+id,
		  	onSuccess: function(transport) {
				callContent(rol, page, rol);
				//alert(transport.responseText);
		  }
		});
			//document.getElementById('proc').style.display = 'none';
		break;
		case 'delimage':
			var url = 'manage_itemimages.php';
			document.getElementById('proc').style.display = 'block';
			// notice the use of a proxy to circumvent the Same Origin Policy.
			new Ajax.Request(url, {
		  	method: 'post',
		  	parameters: 'type=delimage&id='+id,
		  	onSuccess: function(transport) {
				callContent(rol, page, rol);
				//alert(transport.responseText);
		  }
		});
			//document.getElementById('proc').style.display = 'none';
		break;
		case 'delimg':
			var url = 'manage_itemdetails.php';
			document.getElementById('proc').style.display = 'block';
			// notice the use of a proxy to circumvent the Same Origin Policy.
			new Ajax.Request(url, {
		  	method: 'post',
		  	parameters: 'type=delimg&id='+id,
		  	onSuccess: function(transport) {
				callContent(obVal, page, rol);
				//alert(transport.responseText);
		  }
		});
			//document.getElementById('proc').style.display = 'none';
		break;
		case 'items':
			var url = 'manage_itemdetails.php';
			document.getElementById('proc').style.display = 'block';
			// notice the use of a proxy to circumvent the Same Origin Policy.
			new Ajax.Request(url, {
		  	method: 'post',
		  	parameters: 'type=delitem&id='+id,
		  	onSuccess: function(transport) {
				callContent(obVal, page, rol);
				//alert(transport.responseText);
		  }
		});
			//document.getElementById('proc').style.display = 'none';
		break;
		case 'cat':
			var url = 'cat.php';
			document.getElementById('proc').style.display = 'block';
			// notice the use of a proxy to circumvent the Same Origin Policy.
			new Ajax.Request(url, {
		  	method: 'post',
		  	parameters: 'type=delcate&id='+id,
		  	onSuccess: function(transport) {
			alert(transport.responseText);
			var notice = $('mainContent');
			notice.update(transport.responseText);
			pageCategory(page, rol);
		  }
		});
			//document.getElementById('proc').style.display = 'none';
		break;
		
		case 'users':
			var url = 'manage_users.php';
			document.getElementById('proc').style.display = 'block';
			// notice the use of a proxy to circumvent the Same Origin Policy.
			//document.getElementById('proc').style.display = 'block';
			new Ajax.Request(url, {
		  	method: 'post',
		  	parameters: 'type=deluser&id='+id,
		  	onSuccess: function(transport) {
				callContent(obVal, page, '');
			//document.getElimentById('proc').style.display=none;
			//alert(transport.responseText);
		  }
		});
			//document.getElementById('proc').style.display = 'none';
		break;
		
		case 'gallery':
			var url = 'manage_gallery.php';
			document.getElementById('proc').style.display = 'block';
			// notice the use of a proxy to circumvent the Same Origin Policy.
			//document.getElementById('proc').style.display = 'block';
			new Ajax.Request(url, {
		  	method: 'post',
		  	parameters: 'type=delgal&id='+id,
		  	onSuccess: function(transport) {
				callContent(obVal, page, '');
			//document.getElimentById('proc').style.display=none;
			//alert(transport.responseText);
		  }
		});
			//document.getElementById('proc').style.display = 'none';
		break;
		
		case 'infogallery':
			var url = 'manage_info_gallery.php';
			document.getElementById('proc').style.display = 'block';
			// notice the use of a proxy to circumvent the Same Origin Policy.
			//document.getElementById('proc').style.display = 'block';
			new Ajax.Request(url, {
		  	method: 'post',
		  	parameters: 'type=delinfogal&id='+id,
		  	onSuccess: function(transport) {
				callContent(obVal, page, '');
			//document.getElimentById('proc').style.display=none;
			//alert(transport.responseText);
		  }
		});
			//document.getElementById('proc').style.display = 'none';
		break;
		
		case 'pages':
			var url = 'manage_pages.php';
			document.getElementById('proc').style.display = 'block';
			// notice the use of a proxy to circumvent the Same Origin Policy.
			//document.getElementById('proc').style.display = 'block';
			new Ajax.Request(url, {
		  	method: 'post',
		  	parameters: 'type=delpages&id='+id,
		  	onSuccess: function(transport) {
				callContent(obVal, page, '');
			//document.getElimentById('proc').style.display=none;
			//alert(transport.responseText);
		  }
		});
			//document.getElementById('proc').style.display = 'none';
		break;
		
		case 'tags':
			var url = 'manage_tags.php';
			document.getElementById('proc').style.display = 'block';
			// notice the use of a proxy to circumvent the Same Origin Policy.
			//document.getElementById('proc').style.display = 'block';
			new Ajax.Request(url, {
		  	method: 'post',
		  	parameters: 'type=deltag&id='+id,
		  	onSuccess: function(transport) {
				callContent(obVal, page, '');
			//document.getElimentById('proc').style.display=none;
			//alert(transport.responseText);
		  }
		});
			//document.getElementById('proc').style.display = 'none';
		break;
		
		case 'template':
			var url = 'manage_template.php';
			document.getElementById('proc').style.display = 'block';
			// notice the use of a proxy to circumvent the Same Origin Policy.
			//document.getElementById('proc').style.display = 'block';
			new Ajax.Request(url, {
		  	method: 'post',
		  	parameters: 'type=deltemp&id='+id,
		  	onSuccess: function(transport) {
				callContent(obVal, page, '');
			//document.getElimentById('proc').style.display=none;
			//alert(transport.responseText);
		  }
		});
			//document.getElementById('proc').style.display = 'none';
		break;
		
		case 'contact':
			var url = 'manage_contact.php';
			document.getElementById('proc').style.display = 'block';
			// notice the use of a proxy to circumvent the Same Origin Policy.
			//document.getElementById('proc').style.display = 'block';
			new Ajax.Request(url, {
		  	method: 'post',
		  	parameters: 'type=delcontact&id='+id,
		  	onSuccess: function(transport) {
				callContent(obVal, page, '');
			//document.getElimentById('proc').style.display=none;
			//alert(transport.responseText);
		  }
		});
			//document.getElementById('proc').style.display = 'none';
		break;
		
		case 'news':
			var url = 'news.php';
			document.getElementById('proc').style.display = 'block';
			// notice the use of a proxy to circumvent the Same Origin Policy.
			//document.getElementById('proc').style.display = 'block';
			new Ajax.Request(url, {
		  	method: 'post',
		  	parameters: 'type=delnews&id='+id,
		  	onSuccess: function(transport) {
				callContent(obVal, page, '');
			//document.getElimentById('proc').style.display=none;
			//alert(transport.responseText);
		  }
		});
			//document.getElementById('proc').style.display = 'none';
		break;
		
		case 'links':
			var url = 'manage_links.php';
			document.getElementById('proc').style.display = 'block';
			// notice the use of a proxy to circumvent the Same Origin Policy.
			//document.getElementById('proc').style.display = 'block';
			new Ajax.Request(url, {
		  	method: 'post',
		  	parameters: 'type=dellink&id='+id,
		  	onSuccess: function(transport) {
				callContent(obVal, page, '');
			//document.getElimentById('proc').style.display=none;
			//alert(transport.responseText);
		  }
		});
			//document.getElementById('proc').style.display = 'none';
		break;
		
		case 'design':
			var url = 'manage_design.php';
			document.getElementById('proc').style.display = 'block';
			// notice the use of a proxy to circumvent the Same Origin Policy.
			//document.getElementById('proc').style.display = 'block';
			new Ajax.Request(url, {
		  	method: 'post',
		  	parameters: 'type=deldes&id='+id,
		  	onSuccess: function(transport) {
				callContent(obVal, page, '');
			//document.getElimentById('proc').style.display=none;
			//alert(transport.responseText);
		  }
		});
			//document.getElementById('proc').style.display = 'none';
		break;
		
		case 'inquiry':
			var url = 'inquiry.php';
			document.getElementById('proc').style.display = 'block';
			// notice the use of a proxy to circumvent the Same Origin Policy.
			//document.getElementById('proc').style.display = 'block';
			new Ajax.Request(url, {
		  	method: 'post',
		  	parameters: 'type=delInq&id='+id,
		  	onSuccess: function(transport) {
				callContent(obVal, page, '');
			//document.getElimentById('proc').style.display=none;
			//alert(transport.responseText);
		  }
		});
			//document.getElementById('proc').style.display = 'none';
		break;
		case 'pattern':
			var url = 'pattern.php';
			document.getElementById('proc').style.display = 'block';
			// notice the use of a proxy to circumvent the Same Origin Policy.
			//document.getElementById('proc').style.display = 'block';
			new Ajax.Request(url, {
		  	method: 'post',
		  	parameters: 'type=delpattern&id='+id,
		  	onSuccess: function(transport) {
				callContent(obVal, page, '');
			//document.getElimentById('proc').style.display=none;
			//alert(transport.responseText);
		  }
		});
			//document.getElementById('proc').style.display = 'none';
		break;
		case 'vendor':
			var url = 'vendors.php';
			document.getElementById('proc').style.display = 'block';
			// notice the use of a proxy to circumvent the Same Origin Policy.
			//document.getElementById('proc').style.display = 'block';
			new Ajax.Request(url, {
		  	method: 'post',
		  	parameters: 'type=delvendor&id='+id,
		  	onSuccess: function(transport) {
				callContent(obVal, page, '');
			//document.getElimentById('proc').style.display=none;
			//alert(transport.responseText);
		  }
		});
			//document.getElementById('proc').style.display = 'none';
		break;
		case 'label':
			var url = 'labels.php';
			document.getElementById('proc').style.display = 'block';
			// notice the use of a proxy to circumvent the Same Origin Policy.
			//document.getElementById('proc').style.display = 'block';
			new Ajax.Request(url, {
		  	method: 'post',
		  	parameters: 'type=dellabel&id='+id,
		  	onSuccess: function(transport) {
				callContent(obVal, page, '');
			//document.getElimentById('proc').style.display=none;
			//alert(transport.responseText);
		  }
		});
			//document.getElementById('proc').style.display = 'none';
		break;
		case 'tech':
			var url = 'techinfo.php';
			document.getElementById('proc').style.display = 'block';
			// notice the use of a proxy to circumvent the Same Origin Policy.
			//document.getElementById('proc').style.display = 'block';
			new Ajax.Request(url, {
		  	method: 'post',
		  	parameters: 'type=deltech&id='+id,
		  	onSuccess: function(transport) {
				callContent(obVal, page, '');
			//document.getElimentById('proc').style.display=none;
			//alert(transport.responseText);
		  }
		});
			//document.getElementById('proc').style.display = 'none';
		break;
		case 'details':
			var url = 'details.php';
			document.getElementById('proc').style.display = 'block';
			// notice the use of a proxy to circumvent the Same Origin Policy.
			//document.getElementById('proc').style.display = 'block';
			new Ajax.Request(url, {
		  	method: 'post',
		  	parameters: 'type=deldetails&id='+id,
		  	onSuccess: function(transport) {
				callContent(obVal, page, '');
			//alert(transport.responseText);
		  }
		});
		break;
		case 'detailsimg':
			var url = 'details_img.php';
			document.getElementById('proc').style.display = 'block';
			// notice the use of a proxy to circumvent the Same Origin Policy.
			new Ajax.Request(url, {
		  	method: 'post',
		  	parameters: 'type=delimg&id='+id,
		  	onSuccess: function(transport) {
			detImg(page, rol);
				//alert(transport.responseText);
		  }
		});
			//document.getElementById('proc').style.display = 'none';
		break;
	}
}
function Refill(obVal, rol){
	switch(obVal){
	 case 'subcat':
			var url = 'fill.php?act='+obVal+'&rid='+rol;
			document.getElementById('proc').style.display = 'block';
			//alert(url);
			// notice the use of a proxy to circumvent the Same Origin Policy.
			new Ajax.Request(url, {
			  method: 'get',
			  onSuccess: function(transport) {
				  //alert(transport.responseText);
				var notice = $('foo');
				  if (notice.update(transport.responseText)){
				  document.getElementById('proc').style.display = 'none';
				  };
				  //$('linkAddCate').style.visibility='visible';
			  }
			});
			//document.getElementById('proc').style.display = 'none';
		break;
	case 'pattern':
			var url = 'fill.php?act='+obVal+'&rid='+rol;
			document.getElementById('proc').style.display = 'block';
			// notice the use of a proxy to circumvent the Same Origin Policy.
			new Ajax.Request(url, {
			  method: 'get',
			  onSuccess: function(transport) {
				  //alert(transport.responseText);
				var notice = $('foo');
				  if (notice.update(transport.responseText)){
				  document.getElementById('proc').style.display = 'none';
				  };
				  //$('linkAddCate').style.visibility='visible';
			  }
			});
			//document.getElementById('proc').style.display = 'none';
		break;
		case 'details':
			var url = 'fill.php?act='+obVal+'&rid='+rol;
			document.getElementById('proc').style.display = 'block';
			// notice the use of a proxy to circumvent the Same Origin Policy.
			new Ajax.Request(url, {
			  method: 'get',
			  onSuccess: function(transport) {
				  //alert(transport.responseText);
				var notice = $('foo');
				  if (notice.update(transport.responseText)){
				  document.getElementById('proc').style.display = 'none';
				  };
				  //$('linkAddCate').style.visibility='visible';
			  }
			});
			//document.getElementById('proc').style.display = 'none';
		break;
	}
}
function pageCategory(page, rol){
		var url = 'cat.php?page='+page+'&rol='+rol;
		document.getElementById('proc').style.display = 'block';
		// notice the use of a proxy to circumvent the Same Origin Policy.
		new Ajax.Request(url, {
		  method: 'get',
		  onSuccess: function(transport) {
				//alert(transport.responseText);
			  var notice = $('mainContent');
			  if (notice.update(transport.responseText)){
				  document.getElementById('proc').style.display = 'none';
			  };
		  }
		});
		//document.getElementById('proc').style.display = 'none';
}
function callImages(obVal, rol){
	switch(obVal){
	 case 0:
			var url = 'img.php?rol='+rol;
			document.getElementById('proc').style.display = 'block';
			// notice the use of a proxy to circumvent the Same Origin Policy.
			new Ajax.Request(url, {
			  method: 'get',
			  onSuccess: function(transport) {
				var notice = $('mainContent');
				  if (notice.update(transport.responseText)){
				  document.getElementById('proc').style.display = 'none';
				  };
				  //$('linkAddCate').style.visibility='visible';
			  }
			});
			//document.getElementById('proc').style.display = 'none';
		break;
		case 1:
			var url = 'details_img.php?rol='+rol;
			document.getElementById('proc').style.display = 'block';
			// notice the use of a proxy to circumvent the Same Origin Policy.
			new Ajax.Request(url, {
			  method: 'get',
			  onSuccess: function(transport) {
				var notice = $('mainContent');
				  if (notice.update(transport.responseText)){
				  document.getElementById('proc').style.display = 'none';
				  };
				  //$('linkAddCate').style.visibility='visible';
			  }
			});
			//document.getElementById('proc').style.display = 'none';
		break;
	}
}
function pageImg(page, rol){
		var url = 'img.php?page='+page+'&rol='+rol;
		document.getElementById('proc').style.display = 'block';
		// notice the use of a proxy to circumvent the Same Origin Policy.
		new Ajax.Request(url, {
		  method: 'get',
		  onSuccess: function(transport) {
				//alert(transport.responseText);
			  var notice = $('mainContent');
			  if (notice.update(transport.responseText)){
				  document.getElementById('proc').style.display = 'none';
				  };
		  }
		});
		//document.getElementById('proc').style.display = 'none';
}
function detImg(page, rol){
		var url = 'details_img.php?page='+page+'&rol='+rol;
		document.getElementById('proc').style.display = 'block';
		// notice the use of a proxy to circumvent the Same Origin Policy.
		new Ajax.Request(url, {
		  method: 'get',
		  onSuccess: function(transport) {
				//alert(transport.responseText);
			  var notice = $('mainContent');
			  if (notice.update(transport.responseText)){
				  document.getElementById('proc').style.display = 'none';
				  };
		  }
		});
		//document.getElementById('proc').style.display = 'none';
}
function callCategories(obVal, rol){
switch(obVal)
{
 case 0:
		var url = 'cat.php?rol='+rol;
		document.getElementById('proc').style.display = 'block';
		// notice the use of a proxy to circumvent the Same Origin Policy.
		new Ajax.Request(url, {
		  method: 'get',
		  onSuccess: function(transport) {
			var notice = $('mainContent');
			  if (notice.update(transport.responseText)){
				  document.getElementById('proc').style.display = 'none';
			  };
			  //$('linkAddCate').style.visibility='visible';
		  }
		});
	break; 
 case 1:
		var url = 'manage_cats.php';
		document.getElementById('proc').style.display = 'block';
		// notice the use of a proxy to circumvent the Same Origin Policy.
		new Ajax.Request(url, {
		  method: 'get',
		  onSuccess: function(transport) {
			var notice = $('mainContent');
			  if (notice.update(transport.responseText)){
				  document.getElementById('proc').style.display = 'none';
				  };
			  $('linkAddCate').style.visibility='visible';
		  }
		});
		//document.getElementById('proc').style.display = 'none';
	break; 
 case 2:
		var url = 'prods.php';
		document.getElementById('proc').style.display = 'block';
		// notice the use of a proxy to circumvent the Same Origin Policy.
		new Ajax.Request(url, {
		  method: 'post',
		  parameters: 'type=cate&category='+$F('categoryname'),
		  onSuccess: function(transport) {
			var notice = $('mesage');
			  if (notice.update(transport.responseText)){
				  document.getElementById('proc').style.display = 'none';
				  };
			  callCategories(0);
		  }
		});
		//document.getElementById('proc').style.display = 'none';
	break; 
	
 case 3:
		var url = 'contegories.php';
		// notice the use of a proxy to circumvent the Same Origin Policy.
		new Ajax.Request(url, {
		  method: 'post',
		  parameters: 'type=cate&category='+$F('categoryname')+'&id='+$F('id'),
		  onSuccess: function(transport) {
			var notice = $('mesage');
			  if (notice.update(transport.responseText)){
				  document.getElementById('proc').style.display = 'none';
				  };
			  callCategories(0);
		  }
		});
		//document.getElementById('proc').style.display = 'none';
	break; 
	 case 4:
		hideIbox();
		callCategories(0);
		/*var url = 'manage_cats.php';
		// notice the use of a proxy to circumvent the Same Origin Policy.
		new Ajax.Request(url, {
		  method: 'get',
		  onSuccess: function(transport) {
			var notice = $('mainContent');
			  notice.update(transport.responseText);
			  $('linkAddCate').style.visibility='visible';
		  }
		});*/
	break; 
}
}
function callContent(obVal, page, rol){

	switch (obVal){
		case 'trackcode':
			var url = 'manage_trackcodes.php';
			document.getElementById('proc').style.display = 'block';
			// notice the use of a proxy to circumvent the Same Origin Policy.
			new Ajax.Request(url, {
		  	method: 'post',
		  	parameters: 'page='+page+'&rol='+rol,
		  	onSuccess: function(transport) {
			//alert(transport.responseText);
			var notice = $('mainContent');
			  if (notice.update(transport.responseText)){
				  document.getElementById('proc').style.display = 'none';
			  };
		  }
		});
			//document.getElementById('proc').style.display = 'none';
		break;
		
		case 'inquiry':
			var url = 'inquiry.php';
			document.getElementById('proc').style.display = 'block';
			// notice the use of a proxy to circumvent the Same Origin Policy.
			new Ajax.Request(url, {
		  	method: 'post',
		  	parameters: 'page='+page+'&rol='+rol,
		  	onSuccess: function(transport) {
			//alert(transport.responseText);
			var notice = $('mainContent');
			  if (notice.update(transport.responseText)){
				  document.getElementById('proc').style.display = 'none';
			  };
		  }
		});
			//document.getElementById('proc').style.display = 'none';
		break;
		
		case 'admin':
			var url = 'home.php';
			document.getElementById('proc').style.display = 'block';
			// notice the use of a proxy to circumvent the Same Origin Policy.
			new Ajax.Request(url, {
		  	method: 'post',
		  	parameters: 'page='+page+'&rol='+rol,
		  	onSuccess: function(transport) {
			//alert(transport.responseText);
			var notice = $('mainContent');
			  if (notice.update(transport.responseText)){
				  document.getElementById('proc').style.display = 'none';
			  };
		  }
		});
			//document.getElementById('proc').style.display = 'none';
		break;
		case 'add_page':
			var url = 'add_pages.php';
			document.getElementById('proc').style.display = 'block';
			// notice the use of a proxy to circumvent the Same Origin Policy.
			new Ajax.Request(url, {
		  	method: 'post',
		  	parameters: 'page='+page+'&rol='+rol,
		  	onSuccess: function(transport) {
			//alert(transport.responseText);
			var notice = $('mainContent');
			  if (notice.update(transport.responseText)){
				  document.getElementById('proc').style.display = 'none';
			  };
		  }
		});
			//document.getElementById('proc').style.display = 'none';
		break;
		case 'add_contact':
			var url = 'add_contact.php';
			document.getElementById('proc').style.display = 'block';
			// notice the use of a proxy to circumvent the Same Origin Policy.
			new Ajax.Request(url, {
		  	method: 'post',
		  	parameters: 'page='+page+'&rol='+rol,
		  	onSuccess: function(transport) {
			//alert(transport.responseText);
			var notice = $('mainContent');
			  if (notice.update(transport.responseText)){
				  document.getElementById('proc').style.display = 'none';
			  };
		  }
		});
			//document.getElementById('proc').style.display = 'none';
		break;
		case 'add_design':
			var url = 'add_design.php';
			document.getElementById('proc').style.display = 'block';
			// notice the use of a proxy to circumvent the Same Origin Policy.
			new Ajax.Request(url, {
		  	method: 'post',
		  	parameters: 'page='+page+'&rol='+rol,
		  	onSuccess: function(transport) {
			//alert(transport.responseText);
			var notice = $('mainContent');
			  if (notice.update(transport.responseText)){
				  document.getElementById('proc').style.display = 'none';
			  };
		  }
		});
			//document.getElementById('proc').style.display = 'none';
		break;
		case 'add_gallery':
			var url = 'add_gallery.php';
			document.getElementById('proc').style.display = 'block';
			// notice the use of a proxy to circumvent the Same Origin Policy.
			new Ajax.Request(url, {
		  	method: 'post',
		  	parameters: 'page='+page+'&rol='+rol,
		  	onSuccess: function(transport) {
			//alert(transport.responseText);
			var notice = $('mainContent');
			  if (notice.update(transport.responseText)){
				  document.getElementById('proc').style.display = 'none';
			  };
		  }
		});
			//document.getElementById('proc').style.display = 'none';
		break;
		case 'add_info_gallery':
			var url = 'add_info_gallery.php';
			document.getElementById('proc').style.display = 'block';
			// notice the use of a proxy to circumvent the Same Origin Policy.
			new Ajax.Request(url, {
		  	method: 'post',
		  	parameters: 'page='+page+'&rol='+rol,
		  	onSuccess: function(transport) {
			//alert(transport.responseText);
			var notice = $('mainContent');
			  if (notice.update(transport.responseText)){
				  document.getElementById('proc').style.display = 'none';
			  };
		  }
		});
			//document.getElementById('proc').style.display = 'none';
		break;
		case 'add_item':
			//alert(page);
			var url = 'add_itemdetails.php';
			document.getElementById('proc').style.display = 'block';
			// notice the use of a proxy to circumvent the Same Origin Policy.
			new Ajax.Request(url, {
		  	method: 'post',
		  	parameters: 'page='+page+'&rol='+rol,
		  	onSuccess: function(transport) {
			//alert(transport.responseText);
			var notice = $('mainContent');
			  if (notice.update(transport.responseText)){
				  document.getElementById('proc').style.display = 'none';
			  };
		  }
		});
			//document.getElementById('proc').style.display = 'none';
		break;
		case 'add_item_image':
			//alert(page);
			var url = 'add_itemimages.php';
			document.getElementById('proc').style.display = 'block';
			// notice the use of a proxy to circumvent the Same Origin Policy.
			new Ajax.Request(url, {
		  	method: 'post',
		  	parameters: 'page='+page+'&rol='+rol,
		  	onSuccess: function(transport) {
			//alert(transport.responseText);
			var notice = $('mainContent');
			  if (notice.update(transport.responseText)){
				  document.getElementById('proc').style.display = 'none';
			  };
		  }
		});
			//document.getElementById('proc').style.display = 'none';
		break;
		case 'add_link':
			//alert(page);
			var url = 'add_link.php';
			document.getElementById('proc').style.display = 'block';
			// notice the use of a proxy to circumvent the Same Origin Policy.
			new Ajax.Request(url, {
		  	method: 'post',
		  	parameters: 'page='+page+'&rol='+rol,
		  	onSuccess: function(transport) {
			//alert(transport.responseText);
			var notice = $('mainContent');
			  if (notice.update(transport.responseText)){
				  document.getElementById('proc').style.display = 'none';
			  };
		  }
		});
			//document.getElementById('proc').style.display = 'none';
		break;
		case 'add_tags':
			//alert(page);
			var url = 'add_tags.php';
			document.getElementById('proc').style.display = 'block';
			// notice the use of a proxy to circumvent the Same Origin Policy.
			new Ajax.Request(url, {
		  	method: 'post',
		  	parameters: 'page='+page+'&rol='+rol,
		  	onSuccess: function(transport) {
			//alert(transport.responseText);
			var notice = $('mainContent');
			  if (notice.update(transport.responseText)){
				  document.getElementById('proc').style.display = 'none';
			  };
		  }
		});
			//document.getElementById('proc').style.display = 'none';
		break;
		case 'add_news':
			//alert(page);
			var url = 'add_news.php';
			document.getElementById('proc').style.display = 'block';
			// notice the use of a proxy to circumvent the Same Origin Policy.
			new Ajax.Request(url, {
		  	method: 'post',
		  	parameters: 'page='+page+'&rol='+rol,
		  	onSuccess: function(transport) {
			//alert(transport.responseText);
			var notice = $('mainContent');
			  if (notice.update(transport.responseText)){
				  document.getElementById('proc').style.display = 'none';
			  };
		  }
		});
			//document.getElementById('proc').style.display = 'none';
		break;
		case 'add_template':
			//alert(page);
			var url = 'add_template.php';
			document.getElementById('proc').style.display = 'block';
			// notice the use of a proxy to circumvent the Same Origin Policy.
			new Ajax.Request(url, {
		  	method: 'post',
		  	parameters: 'page='+page+'&rol='+rol,
		  	onSuccess: function(transport) {
			//alert(transport.responseText);
			var notice = $('mainContent');
			  if (notice.update(transport.responseText)){
				  document.getElementById('proc').style.display = 'none';
			  };
		  }
		});
			//document.getElementById('proc').style.display = 'none';
		break;
		case 'add_trackcode':
			//alert(page);
			var url = 'add_trackcode.php';
			document.getElementById('proc').style.display = 'block';
			// notice the use of a proxy to circumvent the Same Origin Policy.
			new Ajax.Request(url, {
		  	method: 'post',
		  	parameters: 'page='+page+'&rol='+rol,
		  	onSuccess: function(transport) {
			//alert(transport.responseText);
			var notice = $('mainContent');
			  if (notice.update(transport.responseText)){
				  document.getElementById('proc').style.display = 'none';
			  };
		  }
		});
			//document.getElementById('proc').style.display = 'none';
		break;
		case 'add_user':
			//alert(page);
			var url = 'add_users.php';
			document.getElementById('proc').style.display = 'block';
			// notice the use of a proxy to circumvent the Same Origin Policy.
			new Ajax.Request(url, {
		  	method: 'post',
		  	parameters: 'page='+page+'&rol='+rol,
		  	onSuccess: function(transport) {
			//alert(transport.responseText);
			var notice = $('mainContent');
			  if (notice.update(transport.responseText)){
				  document.getElementById('proc').style.display = 'none';
			  };
		  }
		});
			//document.getElementById('proc').style.display = 'none';
		break;
		case 'contact':
			var url = 'manage_contact.php';
			document.getElementById('proc').style.display = 'block';
			// notice the use of a proxy to circumvent the Same Origin Policy.
			new Ajax.Request(url, {
		  	method: 'post',
		  	parameters: 'page='+page+'&rol='+rol,
		  	onSuccess: function(transport) {
			//alert(transport.responseText);
			var notice = $('mainContent');
			  if (notice.update(transport.responseText)){
				  document.getElementById('proc').style.display = 'none';
			  };
		  }
		});
			//document.getElementById('proc').style.display = 'none';
		break;
		case 'inquiry':
			var url = 'inquiry.php';
			document.getElementById('proc').style.display = 'block';
			// notice the use of a proxy to circumvent the Same Origin Policy.
			new Ajax.Request(url, {
		  	method: 'post',
		  	parameters: 'page='+page+'&rol='+rol,
		  	onSuccess: function(transport) {
			//alert(transport.responseText);
			var notice = $('mainContent');
			  if (notice.update(transport.responseText)){
				  document.getElementById('proc').style.display = 'none';
			  };
		  }
		});
			//document.getElementById('proc').style.display = 'none';
		break;
		case 'itemimages':
			var url = 'manage_itemimages.php';
			document.getElementById('proc').style.display = 'block';
			// notice the use of a proxy to circumvent the Same Origin Policy.
			new Ajax.Request(url, {
		  	method: 'post',
		  	parameters: 'page='+page+'&rol='+rol,
		  	onSuccess: function(transport) {
			//alert(transport.responseText);
			var notice = $('mainContent');
			  if (notice.update(transport.responseText)){
				  document.getElementById('proc').style.display = 'none';
			  };
		  }
		});
			//document.getElementById('proc').style.display = 'none';
		break;
		case 'users':
			var url = 'manage_users.php';
			document.getElementById('proc').style.display = 'block';
			// notice the use of a proxy to circumvent the Same Origin Policy.
			new Ajax.Request(url, {
		  	method: 'post',
		  	parameters: 'page='+page+'&rol='+rol,
		  	onSuccess: function(transport) {
			//alert(transport.responseText);
			var notice = $('mainContent');
			  if (notice.update(transport.responseText)){
				  document.getElementById('proc').style.display = 'none';
			  };
		  }
		});
			//document.getElementById('proc').style.display = 'none';
		break;
		case 'items':
			var url = 'manage_itemdetails.php';
			document.getElementById('proc').style.display = 'block';
			// notice the use of a proxy to circumvent the Same Origin Policy.
			new Ajax.Request(url, {
		  	method: 'post',
		  	parameters: 'page='+page+'&rol='+rol,
		  	onSuccess: function(transport) {
			//alert(transport.responseText);
			var notice = $('mainContent');
			  if (notice.update(transport.responseText)){
				  document.getElementById('proc').style.display = 'none';
			  };
		  }
		});
			//document.getElementById('proc').style.display = 'none';
		break;
		case 'itemimages':
			var url = 'manage_itemimages.php';
			document.getElementById('proc').style.display = 'block';
			// notice the use of a proxy to circumvent the Same Origin Policy.
			new Ajax.Request(url, {
		  	method: 'post',
		  	parameters: 'page='+page+'&rol='+rol,
		  	onSuccess: function(transport) {
			//alert(transport.responseText);
			var notice = $('mainContent');
			  if (notice.update(transport.responseText)){
				  document.getElementById('proc').style.display = 'none';
			  };
		  }
		});
			//document.getElementById('proc').style.display = 'none';
		break;
		case 'tags':
			var url = 'manage_tags.php';
			document.getElementById('proc').style.display = 'block';
			// notice the use of a proxy to circumvent the Same Origin Policy.
			new Ajax.Request(url, {
		  	method: 'post',
		  	parameters: 'page='+page+'&rol='+rol,
		  	onSuccess: function(transport) {
			//alert(transport.responseText);
			var notice = $('mainContent');
			  if (notice.update(transport.responseText)){
				  document.getElementById('proc').style.display = 'none';
			  };
		  }
		});
			//document.getElementById('proc').style.display = 'none';
		break;
		
		case 'contact':
			var url = 'manage_contact.php';
			document.getElementById('proc').style.display = 'block';
			// notice the use of a proxy to circumvent the Same Origin Policy.
			new Ajax.Request(url, {
		  	method: 'post',
		  	parameters: 'page='+page+'&rol='+rol,
		  	onSuccess: function(transport) {
			//alert(transport.responseText);
			var notice = $('mainContent');
			  if (notice.update(transport.responseText)){
				  document.getElementById('proc').style.display = 'none';
			  };
		  }
		});
			//document.getElementById('proc').style.display = 'none';
		break;
		
		case 'pages':
			var url = 'manage_pages.php';
			document.getElementById('proc').style.display = 'block';
			// notice the use of a proxy to circumvent the Same Origin Policy.
			new Ajax.Request(url, {
		  	method: 'post',
		  	parameters: 'page='+page+'&rol='+rol,
		  	onSuccess: function(transport) {
			//alert(transport.responseText);
			var notice = $('mainContent');
			  if (notice.update(transport.responseText)){
				  document.getElementById('proc').style.display = 'none';
			  };
		  }
		});
			//document.getElementById('proc').style.display = 'none';
		break;
		case 'news':
			var url = 'news.php';
			document.getElementById('proc').style.display = 'block';
			// notice the use of a proxy to circumvent the Same Origin Policy.
			new Ajax.Request(url, {
		  	method: 'post',
		  	parameters: 'page='+page+'&rol='+rol,
		  	onSuccess: function(transport) {
			//alert(transport.responseText);
			var notice = $('mainContent');
			  if (notice.update(transport.responseText)){
				  document.getElementById('proc').style.display = 'none';
			  };
		  }
		});
			//document.getElementById('proc').style.display = 'none';
		break;
		case 'links':
			var url = 'manage_links.php';
			document.getElementById('proc').style.display = 'block';
			// notice the use of a proxy to circumvent the Same Origin Policy.
			new Ajax.Request(url, {
		  	method: 'post',
		  	parameters: 'page='+page+'&rol='+rol,
		  	onSuccess: function(transport) {
			//alert(transport.responseText);
			var notice = $('mainContent');
			  if (notice.update(transport.responseText)){
				  document.getElementById('proc').style.display = 'none';
			  };
		  }
		});
			//document.getElementById('proc').style.display = 'none';
		break;
		case 'design':
			var url = 'manage_design.php';
			document.getElementById('proc').style.display = 'block';
			// notice the use of a proxy to circumvent the Same Origin Policy.
			new Ajax.Request(url, {
		  	method: 'post',
		  	parameters: 'page='+page+'&rol='+rol,
		  	onSuccess: function(transport) {
			//alert(transport.responseText);
			var notice = $('mainContent');
			  if (notice.update(transport.responseText)){
				  document.getElementById('proc').style.display = 'none';
			  };
		  }
		});
			//document.getElementById('proc').style.display = 'none';
		break;
		
		case 'template':
			var url = 'manage_template.php';
			document.getElementById('proc').style.display = 'block';
			// notice the use of a proxy to circumvent the Same Origin Policy.
			new Ajax.Request(url, {
		  	method: 'post',
		  	parameters: 'page='+page+'&rol='+rol,
		  	onSuccess: function(transport) {
			//alert(transport.responseText);
			var notice = $('mainContent');
			  if (notice.update(transport.responseText)){
				  document.getElementById('proc').style.display = 'none';
			  };
		  }
		});
			//document.getElementById('proc').style.display = 'none';
		break;
		
		case 'gallery':
			var url = 'manage_gallery.php';
			document.getElementById('proc').style.display = 'block';
			// notice the use of a proxy to circumvent the Same Origin Policy.
			new Ajax.Request(url, {
		  	method: 'post',
		  	parameters: 'page='+page+'&rol='+rol,
		  	onSuccess: function(transport) {
			//alert(transport.responseText);
			var notice = $('mainContent');
			  if (notice.update(transport.responseText)){
				  document.getElementById('proc').style.display = 'none';
			  };
		  }
		});
			//document.getElementById('proc').style.display = 'none';
		break;
		case 'infogallery':
			var url = 'manage_info_gallery.php';
			document.getElementById('proc').style.display = 'block';
			// notice the use of a proxy to circumvent the Same Origin Policy.
			new Ajax.Request(url, {
		  	method: 'post',
		  	parameters: 'page='+page+'&rol='+rol,
		  	onSuccess: function(transport) {
			//alert(transport.responseText);
			var notice = $('mainContent');
			  if (notice.update(transport.responseText)){
				  document.getElementById('proc').style.display = 'none';
			  };
		  }
		});
			//document.getElementById('proc').style.display = 'none';
		break;
		case 'addprod':
			var url = 'add_prod.php';
			document.getElementById('proc').style.display = 'block';
			//alert(url+obVal+page);
			// notice the use of a proxy to circumvent the Same Origin Policy.
			new Ajax.Request(url, {
		  	method: 'post',
			parameters: 'page='+page+'&rol='+rol+'&ref_id='+$('ref_id').value+'&name='+$('name').value+'&price='+$('price').value+'&sizes='+$('sizes').value+'&description='+$('descrip').value+'&submit='+$('submit').value,
		  	onSuccess: function(transport) {
			//alert(transport.responseText);
			var notice = $('doo');
			  if (notice.update(transport.responseText)){
				  document.getElementById('proc').style.display = 'none';
			  };
		  }
		});
			//document.getElementById('proc').style.display = 'none';
		break;
		case 'editprod':
			var url = 'add_prod.php';
			document.getElementById('proc').style.display = 'block';
			//alert(url+obVal+page);
			// notice the use of a proxy to circumvent the Same Origin Policy.
			new Ajax.Request(url, {
		  	method: 'post',
			//parameters: 'page='+page+'&rol='+rol,
			parameters: 'page='+page+'&rol='+rol+'&name='+$('name').value+'&price='+$('price').value+'&sizes='+$('sizes').value+'&description='+$('descrip').value+'&edit_id='+$('edit_id').value+'&submit='+$('submit').value,
		  	onSuccess: function(transport) {
			//alert(transport.responseText);
			var notice = $('doo');
			  if (notice.update(transport.responseText)){
				  document.getElementById('proc').style.display = 'none';
			  };
		  }
		});
			//document.getElementById('proc').style.display = 'none';
		break;
		case 'pattern':
			var url = 'pattern.php';
			document.getElementById('proc').style.display = 'block';
			// notice the use of a proxy to circumvent the Same Origin Policy.
			new Ajax.Request(url, {
		  	method: 'post',
		  	parameters: 'page='+page+'&rol='+rol,
		  	onSuccess: function(transport) {
			//alert(transport.responseText);
			var notice = $('mainContent');
			  if (notice.update(transport.responseText)){
				  document.getElementById('proc').style.display = 'none';
			  };
		  }
		});
			//document.getElementById('proc').style.display = 'none';
		break;
		case 'addpat':
			var url = 'add_pat.php';
			document.getElementById('proc').style.display = 'block';
			//alert(url+obVal+page);
			// notice the use of a proxy to circumvent the Same Origin Policy.
			new Ajax.Request(url, {
		  	method: 'post',
			parameters: 'page='+page+'&rol='+rol+'&ref_id='+$('ref_id').value+'&pat_name='+$('pat_name').value+'&submit='+$('submit').value,
		  	onSuccess: function(transport) {
			//alert(transport.responseText);
			var notice = $('doo');
			  if (notice.update(transport.responseText)){
				  document.getElementById('proc').style.display = 'none';
			  };
		  }
		});
			//document.getElementById('proc').style.display = 'none';
		break;
		case 'editpat':
			var url = 'add_pat.php';
			document.getElementById('proc').style.display = 'block';
			//alert(url+obVal+page);
			// notice the use of a proxy to circumvent the Same Origin Policy.
			new Ajax.Request(url, {
		  	method: 'post',
			parameters: 'page='+page+'&rol='+rol+'&pat_name='+$('pat_name').value+'&ref_id='+$('ref_id').value+'&edit_id='+$('edit_id').value+'&submit='+$('submit').value,
		  	onSuccess: function(transport) {
			//alert(transport.responseText);
			var notice = $('doo');
			  if (notice.update(transport.responseText)){
				  document.getElementById('proc').style.display = 'none';
			  };
		  }
		});
			//document.getElementById('proc').style.display = 'none';
		break;
		case 'vendor':
			var url = 'vendors.php';
			document.getElementById('proc').style.display = 'block';
			// notice the use of a proxy to circumvent the Same Origin Policy.
			new Ajax.Request(url, {
		  	method: 'post',
		  	parameters: 'page='+page+'&rol='+rol,
		  	onSuccess: function(transport) {
			//alert(transport.responseText);
			var notice = $('mainContent');
			  if (notice.update(transport.responseText)){
				  document.getElementById('proc').style.display = 'none';
			  };
		  }
		});
			//document.getElementById('proc').style.display = 'none';
		break;
		case 'addven':
			var url = 'add_vendor.php';
			document.getElementById('proc').style.display = 'block';
			//alert(url+obVal+page);
			// notice the use of a proxy to circumvent the Same Origin Policy.
			new Ajax.Request(url, {
		  	method: 'post',
			parameters: 'page='+page+'&rol='+rol+'&ref_id='+$('ref_id').value+'&ven_name='+$('ven_name').value+'&ven_link='+$('ven_link').value+'&submit='+$('submit').value,
		  	onSuccess: function(transport) {
			//alert(transport.responseText);
			var notice = $('doo');
			  if (notice.update(transport.responseText)){
				  document.getElementById('proc').style.display = 'none';
			  };
		  }
		});
			//document.getElementById('proc').style.display = 'none';
		break;
		case 'editven':
			var url = 'add_vendor.php';
			document.getElementById('proc').style.display = 'block';
			//alert(url+obVal+page);
			// notice the use of a proxy to circumvent the Same Origin Policy.
			new Ajax.Request(url, {
		  	method: 'post',
			parameters: 'page='+page+'&rol='+rol+'&ven_name='+$('ven_name').value+'&ref_id='+$('ref_id').value+'&edit_id='+$('edit_id').value+'&ven_link='+$('ven_link').value+'&submit='+$('submit').value,
		  	onSuccess: function(transport) {
			//alert(transport.responseText);
			var notice = $('doo');
			  if (notice.update(transport.responseText)){
				  document.getElementById('proc').style.display = 'none';
			  };
		  }
		});
			//document.getElementById('proc').style.display = 'none';
		break;
		case 'label':
			var url = 'labels.php';
			document.getElementById('proc').style.display = 'block';
			// notice the use of a proxy to circumvent the Same Origin Policy.
			new Ajax.Request(url, {
		  	method: 'post',
		  	parameters: 'page='+page+'&rol='+rol,
		  	onSuccess: function(transport) {
			//alert(transport.responseText);
			var notice = $('mainContent');
			  if (notice.update(transport.responseText)){
				  document.getElementById('proc').style.display = 'none';
			  };
		  }
		});
			//document.getElementById('proc').style.display = 'none';
		break;
		case 'adduser':
			var url = 'add_users.php';
			document.getElementById('proc').style.display = 'block';
			alert(url+obVal+page);
			// notice the use of a proxy to circumvent the Same Origin Policy.
			new Ajax.Request(url, {
		  	method: 'post',
			parameters: 'page='+page+'&rol='+rol+'&username='+$('username').value+'&password='+$('password').value+'&cpassword='+$('cpassword').value+'&profile_name='+$('profile_name').value+'&email_id='+$('email_id').value+'&usertype1='+$('usertype1').value+'&submit='+$('submit').value,
		  	onSuccess: function(transport) {
			//alert(transport.responseText);
			var notice = $('doo');
			  if (notice.update(transport.responseText)){
				  document.getElementById('proc').style.display = 'none';
			  };
		  }
		});
			//document.getElementById('proc').style.display = 'none';
		break;
		case 'edituser':
			var url = 'add_users.php';
			document.getElementById('proc').style.display = 'block';
			//alert(url+obVal+page);
			// notice the use of a proxy to circumvent the Same Origin Policy.
			new Ajax.Request(url, {
		  	method: 'post',
			parameters: 'page='+page+'&rol='+rol+'&username='+$('username').value+'&password='+$('password').value+'&cpassword='+$('cpassword').value+'&profile_name='+$('profile_name').value+'&email_id='+$('email_id').value+'&usertype1='+$('usertype1').value+'&status='+$('status').value+'&edit_id='+$('edit_id').value+'&submit='+$('submit').value,
		  	onSuccess: function(transport) {
			//alert(transport.responseText);
			var notice = $('doo');
			  if (notice.update(transport.responseText)){
				  document.getElementById('proc').style.display = 'none';
			  };
		  }
		});
			//document.getElementById('proc').style.display = 'none';
		break;
		case 'addtags':
			var url = 'add_tags.php';
			document.getElementById('proc').style.display = 'block';
			//alert(url+obVal+page);
			// notice the use of a proxy to circumvent the Same Origin Policy.
			new Ajax.Request(url, {
		  	method: 'post',
			parameters: 'page='+page+'&rol='+rol+'&copyright='+$('copyright').value+'&publisher='+$('publisher').value+'&distribution='+$('distribution').value+'&author='+$('author').value+'&robots='+$('robots').value+'&submit='+$('submit').value,
		  	onSuccess: function(transport) {
			//alert(transport.responseText);
			var notice = $('doo');
			  if (notice.update(transport.responseText)){
				  document.getElementById('proc').style.display = 'none';
			  };
		  }
		});
			//document.getElementById('proc').style.display = 'none';
		break;
		case 'edittags':
			var url = 'add_tags.php';
			document.getElementById('proc').style.display = 'block';
			//alert(url+obVal+page);
			// notice the use of a proxy to circumvent the Same Origin Policy.
			new Ajax.Request(url, {
		  	method: 'post',
			parameters: 'page='+page+'&rol='+rol+'&copyright='+$('copyright').value+'&publisher='+$('publisher').value+'&distribution='+$('distribution').value+'&author='+$('author').value+'&robots='+$('robots').value+'&edit_id='+$('edit_id').value+'&submit='+$('submit').value,
		  	onSuccess: function(transport) {
			//alert(transport.responseText);
			var notice = $('doo');
			  if (notice.update(transport.responseText)){
				  document.getElementById('proc').style.display = 'none';
			  };
		  }
		});
			//document.getElementById('proc').style.display = 'none';
		break;
		
		case 'addcontact':		
			var url = 'add_contact.php';
			document.getElementById('proc').style.display = 'block';
			//alert(url+obVal+page);
			// notice the use of a proxy to circumvent the Same Origin Policy.
			new Ajax.Request(url, {
		  	method: 'post',
			parameters: 'page='+page+'&rol='+rol+'&fname='+$('fname').value+'&contact_address='+$('contact_address').value+'&city='+$('city').value+'&state='+$('state').value+'&country='+$('country').value+'&zip='+$('zip').value+'&email_id='+$('email_id').value+'&email2='+$('email2').value+'&contact_no='+$('contact_no').value+'&full_add='+$('full_add').value+'&submit='+$('submit').value,
		  	onSuccess: function(transport) {
			//alert(transport.responseText);
			var notice = $('doo');
			  if (notice.update(transport.responseText)){
				  document.getElementById('proc').style.display = 'none';
			  };
		  }
		});
			//document.getElementById('proc').style.display = 'none';
		break;
		
		case 'addtemplate':		
			var url = 'add_template.php';
			document.getElementById('proc').style.display = 'block';
			//alert(url+obVal+page);
			// notice the use of a proxy to circumvent the Same Origin Policy.
			new Ajax.Request(url, {
		  	method: 'post',
			parameters: 'page='+page+'&rol='+rol+'&t_name='+$('t_name').value+'&t_disc='+$('t_disc').value+'&t_image='+$('t_image').value+'&status='+$('status').value+'&submit='+$('submit').value,
		  	onSuccess: function(transport) {
			//alert(transport.responseText);
			var notice = $('doo');
			  if (notice.update(transport.responseText)){
				  document.getElementById('proc').style.display = 'none';
			  };
		  }
		});
			//document.getElementById('proc').style.display = 'none';
		break;
		
		case 'edittemplate':
			var url = 'add_template.php';
			document.getElementById('proc').style.display = 'block';
			//alert(url+obVal+page);
			// notice the use of a proxy to circumvent the Same Origin Policy.
			new Ajax.Request(url, {
		  	method: 'post',
			parameters: 'page='+page+'&rol='+rol+'&t_name='+$('t_name').value+'&t_disc='+$('t_disc').value+'&t_image='+$('t_image').value+'&status='+$('status').value+'&edit_id='+$('edit_id').value+'&submit='+$('submit').value,
		  	onSuccess: function(transport) {
			//alert(transport.responseText);
			var notice = $('doo');
			  if (notice.update(transport.responseText)){
				  document.getElementById('proc').style.display = 'none';
			  };
		  }
		});
			//document.getElementById('proc').style.display = 'none';
		break;
		
		case 'editcontact':
			var url = 'add_contact.php';
			document.getElementById('proc').style.display = 'block';
			//alert(url+obVal+page);
			// notice the use of a proxy to circumvent the Same Origin Policy.
			new Ajax.Request(url, {
		  	method: 'post',
			parameters: 'page='+page+'&rol='+rol+'&fname='+$('fname').value+'&contact_address='+$('contact_address').value+'&city='+$('city').value+'&state='+$('state').value+'&country='+$('country').value+'&zip='+$('zip').value+'&email_id='+$('email_id').value+'&email2='+$('email2').value+'&contact_no='+$('contact_no').value+'&full_add='+$('full_add').value+'&edit_id='+$('edit_id').value+'&submit='+$('submit').value,
		  	onSuccess: function(transport) {
			//alert(transport.responseText);
			var notice = $('doo');
			  if (notice.update(transport.responseText)){
				  document.getElementById('proc').style.display = 'none';
			  };
		  }
		});
			//document.getElementById('proc').style.display = 'none';
		break;
		
		case 'addpage':
			var url = 'add_pages.php';
			document.getElementById('proc').style.display = 'block';
			//alert(url+obVal+page);
			// notice the use of a proxy to circumvent the Same Origin Policy.
			new Ajax.Request(url, {
		  	method: 'post',
			parameters: 'page='+page+'&rol='+rol+'&page_name='+$('page_name').value+'&page_head='+$('page_head').value+'&page_content='+$('page_content').value+'&page_parent='+$('page_parent').value+'&page_status='+$('page_status').value+'&page_image='+$('page_image').value+'&alt_tag='+$('alt_tag').value+'&page_type='+$('page_type').value+'&page_order='+$('page_order').value+'&page_meta_title='+$('page_meta_title').value+'&page_meta_key='+$('page_meta_key').value+'&page_meta_desc='+$('page_meta_desc').value+'&submit='+$('submit').value,
		  	onSuccess: function(transport) {
			//alert(transport.responseText);
			var notice = $('doo');
			  if (notice.update(transport.responseText)){
				  document.getElementById('proc').style.display = 'none';
			  };
		  }
		});
			//document.getElementById('proc').style.display = 'none';
		break;
		case 'editpage':
			var url = 'add_pages.php';
			document.getElementById('proc').style.display = 'block';
			//alert(url+obVal+page);
			// notice the use of a proxy to circumvent the Same Origin Policy.
			new Ajax.Request(url, {
		  	method: 'post',
			parameters: 'page='+page+'&rol='+rol+'&page_name='+$('page_name').value+'&page_head='+$('page_head').value+'&page_content='+$('page_content').value+'&page_parent='+$('page_parent').value+'&page_status='+$('page_status').value+'&page_image='+$('page_image').value+'&alt_tag='+$('alt_tag').value+'&page_type='+$('page_type').value+'&page_order='+$('page_order').value+'&page_meta_title='+$('page_meta_title').value+'&page_meta_key='+$('page_meta_key').value+'&page_meta_desc='+$('page_meta_desc').value+'&edit_id='+$('edit_id').value+'&submit='+$('submit').value,
		  	onSuccess: function(transport) {
			//alert(transport.responseText);
			var notice = $('doo');
			  if (notice.update(transport.responseText)){
				  document.getElementById('proc').style.display = 'none';
			  };
		  }
		});
			//document.getElementById('proc').style.display = 'none';
		break;
		
		case 'addinfogallery':
			var url = 'add_info_gallery.php';
			document.getElementById('proc').style.display = 'block';
			//alert(url+obVal+page);
			// notice the use of a proxy to circumvent the Same Origin Policy.
			new Ajax.Request(url, {
		  	method: 'post',
			parameters: 'page='+page+'&rol='+rol+'&image_title='+$('image_title').value+'&image='+$('image').value+'&image_desc='+$('image_desc').value+'&last_updateon='+$('last_updateon').value+'&last_updateby='+$('last_updateby').value+'&page_meta_title='+$('page_meta_title').value+'&page_meta_key='+$('page_meta_key').value+'&page_meta_desc='+$('page_meta_desc').value+'&submit='+$('submit').value,
		  	onSuccess: function(transport) {
			//alert(transport.responseText);
			var notice = $('doo');
			  if (notice.update(transport.responseText)){
				  document.getElementById('proc').style.display = 'none';
			  };
		  }
		});
			//document.getElementById('proc').style.display = 'none';
		break;
		case 'editinfogallery':
			var url = 'add_info_gallery.php';
			document.getElementById('proc').style.display = 'block';
			//alert(url+obVal+page);
			// notice the use of a proxy to circumvent the Same Origin Policy.
			new Ajax.Request(url, {
		  	method: 'post',
			parameters: 'page='+page+'&rol='+rol+'&image_title='+$('image_title').value+'&image='+$('image').value+'&image_desc='+$('image_desc').value+'&last_updateon='+$('last_updateon').value+'&last_updateby='+$('last_updateby').value+'&page_meta_title='+$('page_meta_title').value+'&page_meta_key='+$('page_meta_key').value+'&page_meta_desc='+$('page_meta_desc').value+'&edit_id='+$('edit_id').value+'&submit='+$('submit').value,
		  	onSuccess: function(transport) {
			//alert(transport.responseText);
			var notice = $('doo');
			  if (notice.update(transport.responseText)){
				  document.getElementById('proc').style.display = 'none';
			  };
		  }
		});
			//document.getElementById('proc').style.display = 'none';
		break;
		
		case 'tech':
			var url = 'techinfo.php';
			document.getElementById('proc').style.display = 'block';
			// notice the use of a proxy to circumvent the Same Origin Policy.
			new Ajax.Request(url, {
		  	method: 'post',
		  	parameters: 'page='+page+'&rol='+rol,
		  	onSuccess: function(transport) {
			//alert(transport.responseText);
			var notice = $('mainContent');
			  if (notice.update(transport.responseText)){
				  document.getElementById('proc').style.display = 'none';
			  };
		  }
		});
			//document.getElementById('proc').style.display = 'none';
		break;
		case 'addtech':
			var url = 'add_tech.php';
			document.getElementById('proc').style.display = 'block';
			//alert(url+obVal+page);
			// notice the use of a proxy to circumvent the Same Origin Policy.
			new Ajax.Request(url, {
		  	method: 'post',
			parameters: 'page='+page+'&rol='+rol+'&ti_labelid='+$('ti_labelid').value+'&ti_value='+$('ti_value').value+'&ref_id='+$('ref_id').value+'&submit='+$('submit').value,
		  	onSuccess: function(transport) {
			//alert(transport.responseText);
			var notice = $('doo');
			  if (notice.update(transport.responseText)){
				  document.getElementById('proc').style.display = 'none';
			  };
		  }
		});
			//document.getElementById('proc').style.display = 'none';
		break;
		case 'edittech':
			var url = 'add_tech.php';
			document.getElementById('proc').style.display = 'block';
			//alert(url+obVal+page);
			// notice the use of a proxy to circumvent the Same Origin Policy.
			new Ajax.Request(url, {
		  	method: 'post',
			parameters: 'page='+page+'&rol='+rol+'&ti_value='+$('ti_value').value+'&ti_labelid='+$('ti_labelid').value+'&ref_id='+$('ref_id').value+'&edit_id='+$('edit_id').value+'&submit='+$('submit').value,
		  	onSuccess: function(transport) {
			//alert(transport.responseText);
			var notice = $('doo');
			  if (notice.update(transport.responseText)){
				  document.getElementById('proc').style.display = 'none';
			  };
		  }
		});
			//document.getElementById('proc').style.display = 'none';
		break;
		case 'details':
					
			var url = 'details.php';
			document.getElementById('proc').style.display = 'block';
			// notice the use of a proxy to circumvent the Same Origin Policy.
			new Ajax.Request(url, {
		  	method: 'post',
		  	parameters: 'page='+page+'&rol='+rol,
		  	onSuccess: function(transport) {
			//alert(transport.responseText);
			var notice = $('mainContent');
			  if (notice.update(transport.responseText)){
				  document.getElementById('proc').style.display = 'none';
			  };
		  }
		});
			//document.getElementById('proc').style.display = 'none';
		break;
		case 'adddet':
			var url = 'add_details.php';
			document.getElementById('proc').style.display = 'block';
			//alert(url+obVal+page);
			// notice the use of a proxy to circumvent the Same Origin Policy.
			new Ajax.Request(url, {
		  	method: 'post',
			parameters: 'page='+page+'&rol='+rol+'&ref_id='+$('ref_id').value+'&det_title='+$('det_title').value+'&detail='+$('detail').value+'&submit='+$('submit').value,
		  	onSuccess: function(transport) {
			//alert(transport.responseText);
			var notice = $('doo');
			  if (notice.update(transport.responseText)){
				  document.getElementById('proc').style.display = 'none';
			  };
		  }
		});
			//document.getElementById('proc').style.display = 'none';
		break;
		case 'editdet':
			var url = 'add_details.php';
			document.getElementById('proc').style.display = 'block';
			//alert(url+obVal+page);
			// notice the use of a proxy to circumvent the Same Origin Policy.
			new Ajax.Request(url, {
		  	method: 'post',
			parameters: 'page='+page+'&rol='+rol+'&det_title='+$('det_title').value+'&detail='+$('detail').value+'&ref_id='+$('ref_id').value+'&edit_id='+$('edit_id').value+'&submit='+$('submit').value,
		  	onSuccess: function(transport) {
			//alert(transport.responseText);
			var notice = $('doo');
			  if (notice.update(transport.responseText)){
				  document.getElementById('proc').style.display = 'none';
			  };
		  }
		});
			//document.getElementById('proc').style.display = 'none';
		break;
	}
}
// Functions for Admin section end...


// Function for Front section start...

function showContent(obVal, page, ref){
	switch (obVal){
		case 'cats':
			var url = 'cats.php?catID='+ref+'&page='+page;
			document.getElementById('proc').style.display = 'block';
			// notice the use of a proxy to circumvent the Same Origin Policy.
			new Ajax.Request(url, {
		  	method: 'get',
		  	onSuccess: function(transport) {
			//alert(transport.responseText);
			var notice = $('mainContent');
			  if (notice.update(transport.responseText)){
				  document.getElementById('proc').style.display = 'none';
			  };
		  }
		});
		break;
		case 'tiles':
			var url = 'tilecats.php?catID='+page+'&imgID='+ref;
			document.getElementById('proc').style.display = 'block';
			// notice the use of a proxy to circumvent the Same Origin Policy.
			new Ajax.Request(url, {
		  	method: 'get',
		  	onSuccess: function(transport) {
			//alert(transport.responseText);
			var notice = $('big_pic');
			  if (notice.update(transport.responseText)){
				  document.getElementById('proc').style.display = 'none';
			  };
		  }
		});
		break;
		case 'tilessub':
			var url = 'tilecats.php?catID='+page+'&sub='+ref;
			//alert(url);
			document.getElementById('proc').style.display = 'block';
			// notice the use of a proxy to circumvent the Same Origin Policy.
			new Ajax.Request(url, {
		  	method: 'get',
		  	onSuccess: function(transport) {
			//alert(transport.responseText);
			var notice = $('subImg');
			  if (notice.update(transport.responseText)){
				  document.getElementById('proc').style.display = 'none';
			  };
		  }
		});
		break;
		case 'prods':
			var url = 'products.php?catID='+page+'&imgID='+ref;
			document.getElementById('proc').style.display = 'block';
			// notice the use of a proxy to circumvent the Same Origin Policy.
			new Ajax.Request(url, {
		  	method: 'get',
		  	onSuccess: function(transport) {
			//alert(transport.responseText);
			var notice = $('big_pic');
			  if (notice.update(transport.responseText)){
				  document.getElementById('proc').style.display = 'none';
			  };
		  }
		});
		break;
		case 'prodssub':
			var url = 'products.php?catID='+page+'&sub='+ref;
			//alert(url);
			document.getElementById('proc').style.display = 'block';
			// notice the use of a proxy to circumvent the Same Origin Policy.
			new Ajax.Request(url, {
		  	method: 'get',
		  	onSuccess: function(transport) {
			//alert(transport.responseText);
			var notice = $('subImg');
			  if (notice.update(transport.responseText)){
				  document.getElementById('proc').style.display = 'none';
			  };
		  }
		});
		break;
		case 'prodDetails':
			var url = 'prod_details.php?catID='+page+'&imgID='+ref;
			document.getElementById('proc').style.display = 'block';
			// notice the use of a proxy to circumvent the Same Origin Policy.
			new Ajax.Request(url, {
		  	method: 'get',
		  	onSuccess: function(transport) {
			//alert(transport.responseText);
			var notice = $('big_pic');
			  if (notice.update(transport.responseText)){
				  document.getElementById('proc').style.display = 'none';
			  };
		  }
		});
		break;
		case 'prodsindex':
			var url = 'index.php?prodID='+page+'&sub='+ref;
			//alert(url);
			document.getElementById('proc').style.display = 'block';
			// notice the use of a proxy to circumvent the Same Origin Policy.
			new Ajax.Request(url, {
		  	method: 'get',
		  	onSuccess: function(transport) {
			//alert(transport.responseText);
			var notice = $('big_pic2');
			  if (notice.update(transport.responseText)){
				  document.getElementById('proc').style.display = 'none';
			  };
		  }
		});
		break;
	}
}

// Functions for Front section ent...


// Common Functions start...

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function MM_validateForm() { //v4.0
	//updateRTEs();
  var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;
  for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=MM_findObj(args[i]);
    if (val) { nm=val.title; if ((val=val.value)!="") {
      if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');
        if (p<1 || p==(val.length-1)) errors+='- '+nm+' must contain an e-mail address.\n';
      } else if (test!='R') { num = parseFloat(val);
        if (isNaN(val)) errors+='- '+nm+' must contain a number.\n';
        if (test.indexOf('inRange') != -1) { p=test.indexOf(':');
          min=test.substring(8,p); max=test.substring(p+1);
          if (num<min || max<num) errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n';
    } } } else if (test.charAt(0) == 'R') errors += '- '+nm+' is required.\n'; }
  }if (errors) alert('The following error(s) occurred:\n'+errors);
  document.MM_returnValue = (errors == '');
}

function MM_validateForm2() { //v4.0
	//updateRTEs();
  var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm2.arguments;
  for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=MM_findObj(args[i]);
    if (val) { nm=val.title; if ((val=val.value)!="") {
      if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');
        if (p<1 || p==(val.length-1)) errors+='- '+nm+' must contain an e-mail address.\n';
      } else if (test!='R') { num = parseFloat(val);
        if (isNaN(val)) errors+='- '+nm+' must contain a number.\n';
        if (test.indexOf('inRange') != -1) { p=test.indexOf(':');
          min=test.substring(8,p); max=test.substring(p+1);
          if (num<min || max<num) errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n';
    } } } else if (test.charAt(0) == 'R') errors += '- '+nm+' is required.\n'; }
  } 
  if(jcap() == false){
	errors += '- Please enter correct image code as displayed!\n';
}
  if (errors) alert('The following error(s) occurred:\n'+errors);
  document.MM_returnValue = (errors == '');
}
function Wind_Open(theURL,winName,features){ //v4.0
  window.open(theURL,winName,features);
}

function toggleSelect()
{

if (document.getElementById("footer").checked == true)
{
//document.frm1.chk2.checked = true;
document.prodform.footer2.disabled = true;
//document.frm1.chk1.disabled = false;
}
else
{
if (document.getElementById("footer2").checked == true) {
document.getElementById("footer").disabled = true;
//document.frm1.chk2.checked = false;
}
else {
	document.prodform.footer.disabled = false;
	document.prodform.footer2.disabled = false;
}
}

}


function reorder(obVal, ordBy, page, order){
	var url = obVal+'.php';
	document.getElementById('proc').style.display = 'block';
	// notice the use of a proxy to circumvent the Same Origin Policy.
	new Ajax.Request(url, {
		method: 'post',
	  	parameters: 'page='+page+'&page_id='+ordBy+'&order='+order,
	  	onSuccess: function(transport) {
		//alert(transport.responseText);
		var notice = $('mainContent');
		  if (notice.update(transport.responseText)){
			  document.getElementById('proc').style.display = 'none';
		  };
	  }
	});
}

function callEditContent(obVal, page, rol, id){

	switch (obVal){
		case 'edit_contact':
			var url = 'add_contact.php';
			document.getElementById('proc').style.display = 'block';
			// notice the use of a proxy to circumvent the Same Origin Policy.
			new Ajax.Request(url, {
		  	method: 'get',
		  	parameters: 'page='+page+'&rol='+rol+'&editId='+id,
		  	onSuccess: function(transport) {
			//alert(transport.responseText);
			var notice = $('mainContent');
			  if (notice.update(transport.responseText)){
				  document.getElementById('proc').style.display = 'none';
			  };
		  }
		});
			//document.getElementById('proc').style.display = 'none';
		break;
		case 'edit_design':
			var url = 'add_design.php';
			document.getElementById('proc').style.display = 'block';
			// notice the use of a proxy to circumvent the Same Origin Policy.
			new Ajax.Request(url, {
		  	method: 'get',
		  	parameters: 'page='+page+'&rol='+rol+'&editId='+id,
		  	onSuccess: function(transport) {
			//alert(transport.responseText);
			var notice = $('mainContent');
			  if (notice.update(transport.responseText)){
				  document.getElementById('proc').style.display = 'none';
			  };
		  }
		});
			//document.getElementById('proc').style.display = 'none';
		break;
		case 'edit_info_gallery':
			var url = 'add_info_gallery.php';
			document.getElementById('proc').style.display = 'block';
			// notice the use of a proxy to circumvent the Same Origin Policy.
			new Ajax.Request(url, {
		  	method: 'get',
		  	parameters: 'page='+page+'&rol='+rol+'&editId='+id,
		  	onSuccess: function(transport) {
			//alert(transport.responseText);
			var notice = $('mainContent');
			  if (notice.update(transport.responseText)){
				  document.getElementById('proc').style.display = 'none';
			  };
		  }
		});
			//document.getElementById('proc').style.display = 'none';
		break;
		case 'edit_item':
			var url = 'add_itemdetails.php';
			document.getElementById('proc').style.display = 'block';
			// notice the use of a proxy to circumvent the Same Origin Policy.
			new Ajax.Request(url, {
		  	method: 'get',
		  	parameters: 'page='+page+'&rol='+rol+'&editId='+id,
		  	onSuccess: function(transport) {
			//alert(transport.responseText);
			var notice = $('mainContent');
			  if (notice.update(transport.responseText)){
				  document.getElementById('proc').style.display = 'none';
			  };
		  }
		});
			//document.getElementById('proc').style.display = 'none';
		break;
		case 'edit_pages':
			var url = 'edit_pages.php';
			document.getElementById('proc').style.display = 'block';
			// notice the use of a proxy to circumvent the Same Origin Policy.
			new Ajax.Request(url, {
		  	method: 'get',
		  	parameters: 'page='+page+'&rol='+rol+'&editId='+id,
		  	onSuccess: function(transport) {
			//alert(transport.responseText);
			var notice = $('mainContent');
			  if (notice.update(transport.responseText)){
				  document.getElementById('proc').style.display = 'none';
			  };
		  }
		});
			//document.getElementById('proc').style.display = 'none';
		break;
		case 'edit_link':
			var url = 'add_link.php';
			document.getElementById('proc').style.display = 'block';
			// notice the use of a proxy to circumvent the Same Origin Policy.
			new Ajax.Request(url, {
		  	method: 'get',
		  	parameters: 'page='+page+'&rol='+rol+'&editId='+id,
		  	onSuccess: function(transport) {
			//alert(transport.responseText);
			var notice = $('mainContent');
			  if (notice.update(transport.responseText)){
				  document.getElementById('proc').style.display = 'none';
			  };
		  }
		});
			//document.getElementById('proc').style.display = 'none';
		break;
		case 'edit_tag':
			var url = 'add_tags.php';
			document.getElementById('proc').style.display = 'block';
			// notice the use of a proxy to circumvent the Same Origin Policy.
			new Ajax.Request(url, {
		  	method: 'get',
		  	parameters: 'page='+page+'&rol='+rol+'&editId='+id,
		  	onSuccess: function(transport) {
			//alert(transport.responseText);
			var notice = $('mainContent');
			  if (notice.update(transport.responseText)){
				  document.getElementById('proc').style.display = 'none';
			  };
		  }
		});
			//document.getElementById('proc').style.display = 'none';
		break;
		case 'edit_template':
			var url = 'add_template.php';
			document.getElementById('proc').style.display = 'block';
			// notice the use of a proxy to circumvent the Same Origin Policy.
			new Ajax.Request(url, {
		  	method: 'get',
		  	parameters: 'page='+page+'&rol='+rol+'&editId='+id,
		  	onSuccess: function(transport) {
			//alert(transport.responseText);
			var notice = $('mainContent');
			  if (notice.update(transport.responseText)){
				  document.getElementById('proc').style.display = 'none';
			  };
		  }
		});
			//document.getElementById('proc').style.display = 'none';
		break;
		case 'edit_trackcode':
			var url = 'add_trackcode.php';
			document.getElementById('proc').style.display = 'block';
			// notice the use of a proxy to circumvent the Same Origin Policy.
			new Ajax.Request(url, {
		  	method: 'get',
		  	parameters: 'page='+page+'&rol='+rol+'&editId='+id,
		  	onSuccess: function(transport) {
			//alert(transport.responseText);
			var notice = $('mainContent');
			  if (notice.update(transport.responseText)){
				  document.getElementById('proc').style.display = 'none';
			  };
		  }
		});
			//document.getElementById('proc').style.display = 'none';
		break;
		case 'edit_user':
			var url = 'add_users.php';
			document.getElementById('proc').style.display = 'block';
			// notice the use of a proxy to circumvent the Same Origin Policy.
			new Ajax.Request(url, {
		  	method: 'get',
		  	parameters: 'page='+page+'&rol='+rol+'&editId='+id,
		  	onSuccess: function(transport) {
			//alert(transport.responseText);
			var notice = $('mainContent');
			  if (notice.update(transport.responseText)){
				  document.getElementById('proc').style.display = 'none';
			  };
		  }
		});
			//document.getElementById('proc').style.display = 'none';
		break;
		case 'edit_news':
			var url = 'add_news.php';
			document.getElementById('proc').style.display = 'block';
			// notice the use of a proxy to circumvent the Same Origin Policy.
			new Ajax.Request(url, {
		  	method: 'get',
		  	parameters: 'page='+page+'&rol='+rol+'&editId='+id,
		  	onSuccess: function(transport) {
			//alert(transport.responseText);
			var notice = $('mainContent');
			  if (notice.update(transport.responseText)){
				  document.getElementById('proc').style.display = 'none';
			  };
		  }
		});
			//document.getElementById('proc').style.display = 'none';
		break;
}
}

function callViewContent(obVal, page, rol, id){

	switch (obVal){
		case 'contact':
			var url = 'view_contact.php';
			document.getElementById('proc').style.display = 'block';
			// notice the use of a proxy to circumvent the Same Origin Policy.
			new Ajax.Request(url, {
		  	method: 'get',
		  	parameters: 'page='+page+'&rol='+rol+'&id='+id,
		  	onSuccess: function(transport) {
			//alert(transport.responseText);
			var notice = $('mainContent');
			  if (notice.update(transport.responseText)){
				  document.getElementById('proc').style.display = 'none';
			  };
		  }
		});
			//document.getElementById('proc').style.display = 'none';
		break;
		case 'design':
			var url = 'view_design.php';
			document.getElementById('proc').style.display = 'block';
			// notice the use of a proxy to circumvent the Same Origin Policy.
			new Ajax.Request(url, {
		  	method: 'get',
		  	parameters: 'page='+page+'&rol='+rol+'&id='+id,
		  	onSuccess: function(transport) {
			//alert(transport.responseText);
			var notice = $('mainContent');
			  if (notice.update(transport.responseText)){
				  document.getElementById('proc').style.display = 'none';
			  };
		  }
		});
			//document.getElementById('proc').style.display = 'none';
		break;
		case 'info_gallery':
			var url = 'view_info_gallery.php';
			document.getElementById('proc').style.display = 'block';
			// notice the use of a proxy to circumvent the Same Origin Policy.
			new Ajax.Request(url, {
		  	method: 'get',
		  	parameters: 'page='+page+'&rol='+rol+'&id='+id,
		  	onSuccess: function(transport) {
			//alert(transport.responseText);
			var notice = $('mainContent');
			  if (notice.update(transport.responseText)){
				  document.getElementById('proc').style.display = 'none';
			  };
		  }
		});
			//document.getElementById('proc').style.display = 'none';
		break;
		case 'gallery':
			var url = 'view_gallery.php';
			document.getElementById('proc').style.display = 'block';
			// notice the use of a proxy to circumvent the Same Origin Policy.
			new Ajax.Request(url, {
		  	method: 'get',
		  	parameters: 'page='+page+'&rol='+rol+'&id='+id,
		  	onSuccess: function(transport) {
			//alert(transport.responseText);
			var notice = $('mainContent');
			  if (notice.update(transport.responseText)){
				  document.getElementById('proc').style.display = 'none';
			  };
		  }
		});
			//document.getElementById('proc').style.display = 'none';
		break;
		case 'item':
			var url = 'view_items.php';
			document.getElementById('proc').style.display = 'block';
			// notice the use of a proxy to circumvent the Same Origin Policy.
			new Ajax.Request(url, {
		  	method: 'get',
		  	parameters: 'page='+page+'&rol='+rol+'&id='+id,
		  	onSuccess: function(transport) {
			//alert(transport.responseText);
			var notice = $('mainContent');
			  if (notice.update(transport.responseText)){
				  document.getElementById('proc').style.display = 'none';
			  };
		  }
		});
			//document.getElementById('proc').style.display = 'none';
		break;
		case 'inquiry':
			var url = 'view_inquiry.php';
			document.getElementById('proc').style.display = 'block';
			// notice the use of a proxy to circumvent the Same Origin Policy.
			new Ajax.Request(url, {
		  	method: 'get',
		  	parameters: 'page='+page+'&rol='+rol+'&id='+id,
		  	onSuccess: function(transport) {
			//alert(transport.responseText);
			var notice = $('mainContent');
			  if (notice.update(transport.responseText)){
				  document.getElementById('proc').style.display = 'none';
			  };
		  }
		});
			//document.getElementById('proc').style.display = 'none';
		break;
		case 'link':
			var url = 'view_link.php';
			document.getElementById('proc').style.display = 'block';
			// notice the use of a proxy to circumvent the Same Origin Policy.
			new Ajax.Request(url, {
		  	method: 'get',
		  	parameters: 'page='+page+'&rol='+rol+'&id='+id,
		  	onSuccess: function(transport) {
			//alert(transport.responseText);
			var notice = $('mainContent');
			  if (notice.update(transport.responseText)){
				  document.getElementById('proc').style.display = 'none';
			  };
		  }
		});
			//document.getElementById('proc').style.display = 'none';
		break;
		case 'news':
			var url = 'view_news.php';
			document.getElementById('proc').style.display = 'block';
			// notice the use of a proxy to circumvent the Same Origin Policy.
			new Ajax.Request(url, {
		  	method: 'get',
		  	parameters: 'page='+page+'&rol='+rol+'&id='+id,
		  	onSuccess: function(transport) {
			//alert(transport.responseText);
			var notice = $('mainContent');
			  if (notice.update(transport.responseText)){
				  document.getElementById('proc').style.display = 'none';
			  };
		  }
		});
			//document.getElementById('proc').style.display = 'none';
		break;
		case 'pages':
			var url = 'view_pages.php';
			document.getElementById('proc').style.display = 'block';
			// notice the use of a proxy to circumvent the Same Origin Policy.
			new Ajax.Request(url, {
		  	method: 'get',
		  	parameters: 'page='+page+'&rol='+rol+'&id='+id,
		  	onSuccess: function(transport) {
			//alert(transport.responseText);
			var notice = $('mainContent');
			  if (notice.update(transport.responseText)){
				  document.getElementById('proc').style.display = 'none';
			  };
		  }
		});
			//document.getElementById('proc').style.display = 'none';
		break;
		case 'trackcode':
			var url = 'view_trackcode.php';
			document.getElementById('proc').style.display = 'block';
			// notice the use of a proxy to circumvent the Same Origin Policy.
			new Ajax.Request(url, {
		  	method: 'get',
		  	parameters: 'page='+page+'&rol='+rol+'&id='+id,
		  	onSuccess: function(transport) {
			//alert(transport.responseText);
			var notice = $('mainContent');
			  if (notice.update(transport.responseText)){
				  document.getElementById('proc').style.display = 'none';
			  };
		  }
		});
			//document.getElementById('proc').style.display = 'none';
		break;
		case 'user':
			var url = 'view_user.php';
			document.getElementById('proc').style.display = 'block';
			// notice the use of a proxy to circumvent the Same Origin Policy.
			new Ajax.Request(url, {
		  	method: 'get',
		  	parameters: 'page='+page+'&rol='+rol+'&id='+id,
		  	onSuccess: function(transport) {
			//alert(transport.responseText);
			var notice = $('mainContent');
			  if (notice.update(transport.responseText)){
				  document.getElementById('proc').style.display = 'none';
			  };
		  }
		});
			//document.getElementById('proc').style.display = 'none';
		break;
}
}
// Common Functions end...