// JavaScript Document



// USED with EMAIL safercar

<!--
function popitup(url) {
	newwindow=window.open(url,'name','height=425,width=525,top=300,left=600');
/*if (window.focus) {newwindow.focus()}
	return true;*/
}

//media library

function mediapop(url) {
	newwindow=window.open(url,'name','height=575,width=675,top=300,left=600,resizable');
	/*if (window.focus) {newwindow.focus()}
	return true;*/
}


//another open windos

var popWin = "";

	function openwin(url, strWidth, strHeight) {
	if (popWin != "") {popWin.close()}
	leftStr = (screen.width-strWidth)/2;
	topStr = (screen.height-strHeight)/2-50;
	windowProperties = "toolbar=no,menubar=no,scrollbars=no,statusbar=no,height="+strHeight+",width="+strWidth+",left="+leftStr+",top="+topStr+"";
	popWin = window.open(url,'newWin',windowProperties);
	}


	function openprint(url, strWidth, strHeight) {
	if (popWin != "") {popWin.close()}
	leftStr = (screen.width-strWidth)/2;
	topStr = (screen.height-strHeight)/2-50;
	windowProperties = "toolbar=no,menubar=no,scrollbars=yes,statusbar=no,resizable=yes,height="+strHeight+",width="+strWidth+",left="+leftStr+",top="+topStr+"";
	popWin = window.open(url,'newWin',windowProperties);
	}


  
  
  // toggle with images -- use with details page expandable

// JavaScript Document

	  var imgCollapse = new Image();
	  var imgExpand = new Image();
	  imgCollapse.src = "/staticfiles/scassets/images/collapse.gif";
	  imgExpand.src = "/staticfiles/scassets/images/expand.gif";
	  
	  function restoreBlock(divId, imgNode){
var oImg = imgNode;

		var oDiv = document.getElementById(divId);
		if (oDiv && oDiv.style.display == "block"){
			oImg.src = imgCollapse.src;
			oDiv.style.display = "none";
		}else{
			oImg.src = imgExpand.src;
			oDiv.style.display = "block";	
		}


  }
	 //toggle with href used with ivog home read more 

  function toggle_visibility(id) {
      var e = document.getElementById(id);
      if(e.style.display == 'block')
         e.style.display = 'none';
      else
         e.style.display = 'block';
   }
//toggle with first use safety details page
 function expandit(id) {
		document.getElementById(id).style.display = 'block';
	}
		function closeit(id) {
		document.getElementById(id).style.display = 'none';
	}
