if (self != top) {
	if (document.images)
		top.location.replace(window.location.href);
	else
		top.location.href = window.location.href;
}

// search box
/*var dropdowncolor	= "<?php echo SHOP_COLOR1 ?>";
var dropdownedge	= "/v1/images/edge.gif";
var dropdowngo		= "/v1/images/go.gif";*/
var channel_path = "v1";

/* Function for Drop Down Left Category */
function left_cat_dropdown() {
	var id = document.main.cat.value;
	if(id) {
		window.location = id;
	}
}

function left_subcat_dropdown() {
	var id = document.main.subcat.value;
	if(id) {
		window.location = "/v1/indian/index.php?cat="+id;
	}
}

/* Ajax Obj Function - ajaxjs.js */
function getHTTPObject() {
  var xmlhttp;
  if (window.XMLHttpRequest) { // Mozilla, Safari, ...
		xmlhttp = new XMLHttpRequest();
		if (xmlhttp.overrideMimeType) {
			xmlhttp.overrideMimeType('text/xml');
			// See note below about this line
		}
	} else if (window.ActiveXObject) { // IE
		try {
			xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			try {
				xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
			} catch (e) {}
		}
	}
	if (!xmlhttp) {
		alert('Giving up :( Cannot create an XMLHTTP instance');
		return false;
	}
  return xmlhttp;
}
var http = getHTTPObject(); // We create the HTTP Object

/* Show Hide Function - show-hide.js */
function showhide(layer_ref, state) { 
	if (document.all) { //IS IE 4 or 5 (or 6 beta) 
		eval( "document.all." + layer_ref + ".style.display = state"); 
	} 
	if (document.layers) { //IS NETSCAPE 4 or below 
		document.layers[layer_ref].display = state; 
	} 
	if (document.getElementById &&!document.all) { 
		hza = document.getElementById(layer_ref); 
		hza.style.display = state; 
	} 
	//document.getElementById(layer_ref).style.display = state;
}

var opened=false;
var win1;
browser_version = parseFloat(navigator.appVersion);
function openWin(str,nm,width,height) {
	if(opened == false){
			win1 = open(str,nm,"status=0,scrollbars=1,menubar=0,toolbar=0,location=0,resizeable=0,width="+width+",height="+height);
	}
	else if(opened == true){
			if(win1.closed == false)
					win1.close(); 
			win1 = window.open(str,nm,"status=0,scrollbars=1,menubar=0,toolbar=0,location=0,resizeable=0,width="+width+",height="+height);    
	}
	opened = true;
}
